Search code examples
dockerdocker-composegitlabdocker-machineowncloud

Docker gitlab container heatly but not accessible



Hello, I have the following problem on docker 18.06.1-ce. I have an owncloud container that works with the following configurations:

  • Image : owncloud/server:10.0
  • Status healthy
  • Ports : 0.0.0.0:4090->80/tcp, 0.0.0.0:4093->443/tcp

So far, so good, this container is functional.

Now, I want to add a gitlab container with the following configurations:

  • Image : gitlab/gitlab-ce:latest
  • Status : heatly
  • Ports : 0.0.0.0:2222->22/tcp, 0.0.0.0:8080->80/tcp, 0.0.0.0:4443->443/tcp

The problem is that I can't access the containers with the ports listed above (connection failed). I tried to install the container in a different way:

  • By docker run command :

docker run --detach --hostname nsXXXXX.ip-XX-XXX-XX.eu --env GITLAB_OMNIBUS_CONFIG="external_url 'https://nsXXXXX.ip-XX-XXX-XX.eu:4443'; gitlab_rails['lfs_enabled'] = true;" --publish 4443:443 --publish 8080:80 --publish 2222:22 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest

  • And by docker-compose:

    web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'nsXXXXXXX.ip-XX-XXX-XX.eu' privileged: true environment: GITLAB_OMNIBUS_CONFIG: | external_url 'https://nsXXXXXXX.ip-XX-XXX-XX.eu:4443/' gitlab_rails['gitlab_shell_ssh_port'] = 4182 ports: - '4180:80' - '4443:443' - '4182:22' volumes: - '/srv/gitlab/config:/etc/gitlab' - '/srv/gitlab/logs:/var/log/gitlab' - '/srv/gitlab/data:/var/opt/gitlab'

My docker is on a dedicated Debain Stretch hosted by kimsufi.

Do you have any ideas to help me? Thank you very much.



Solution

  • Solved : https://forum.gitlab.com/t/docker-gitlab-container-healthy-but-not-accessible/20042/5

    It was necessary to map the port of the external URL to the internal port... Beginner's error:)