I'm trying to run a gitlab docker image. I get trouble with ports already in use.
ERROR: for gitlab_web_1 Cannot start service web: driver failed programming external connectivity on endpoint gitlab_web_1 (a22b149b76f705ec3e00c7ec4f6bcad8f0e1b575aba1dbf621c4edcc4d4e5508): Error starting userland proxy: listen tcp 0.0.0.0:22: bind: address already in use
Here is my docker-compose.yml:
web:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
I previously had the same error message for port 80 and 443. To fix it, I removed apache from my server. But I need the port 22 to ssh connect, so I don't know how to make it out...
- Is it possible to have apache and a docker container running with the same ports?
- Why does
gitlab/gitlab-ee
need the port 22?