我正在我的服务器上安装Gitlab,使用基于码头医生的docker。我的SSH端口不是默认的(22),我已经将它更改为类似于2228的其他端口。因此,YML文件变成了这样:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.mydomain.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.mydomain.com'
gitlab_rails['gitlab_shell_ssh_port'] = 2228
ports:
- '80:80'
- '443:443'
- '2228:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'当我运行docker-compose up -d时,我会收到以下结果和错误:
Starting docker_web_1 ...
ERROR: for docker_web_1 a bytes-like object is required, not 'str'
ERROR: for web a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "site-packages/docker/api/client.py", line 261, in _raise_for_status
File "site-packages/requests/models.py", line 940, in raise_for_status
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.21/containers/9d4483106cf1683f46b5158a9550f9b4375d7c147ecb8b07df533840ad0806b6/start
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "compose/service.py", line 625, in start_container
File "compose/container.py", line 241, in start
File "site-packages/docker/utils/decorators.py", line 19, in wrapped
File "site-packages/docker/api/container.py", line 1095, in start
File "site-packages/docker/api/client.py", line 263, in _raise_for_status
File "site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'driver failed programming external connectivity on endpoint docker_web_1 (9b32d28cc2f635e085e82a2ef9f4d1fd3afc76f7693e279405ada5f61b96d215): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use'")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bin/docker-compose", line 6, in <module>
File "compose/cli/main.py", line 72, in main
File "compose/cli/main.py", line 128, in perform_command
File "compose/cli/main.py", line 1107, in up
File "compose/cli/main.py", line 1103, in up
File "compose/project.py", line 570, in up
File "compose/parallel.py", line 112, in parallel_execute
File "compose/parallel.py", line 210, in producer
File "compose/project.py", line 556, in do
File "compose/service.py", line 568, in execute_convergence_plan
File "compose/service.py", line 510, in _execute_convergence_start
File "compose/parallel.py", line 112, in parallel_execute
File "compose/parallel.py", line 210, in producer
File "compose/service.py", line 508, in <lambda>
File "compose/service.py", line 620, in start_container_if_stopped
File "compose/service.py", line 627, in start_container
TypeError: a bytes-like object is required, not 'str'
[5738] Failed to execute script docker-compose我是新来的码头和码头写作,但我做了一切,因为它是写在正式文件。你能帮我解决这个问题吗?
发布于 2019-12-07 02:13:16
在您提供的错误消息中,您的系统正在报告端口443已经在使用中。您需要确认哪些端口用于其他服务。
侦听tcp 0.0.0.0:443: bind: address已在使用
至于是否值得,我建议您使用nginx反向代理。详情请参阅https://stackoverflow.com/questions/46195852/how-to-run-gitlab-in-docker-container-with-nginx-proxy-over-ssl-with-letsencrypt。
https://devops.stackexchange.com/questions/10039
复制相似问题