Hi guy
I have issue gitlab-ce build with docker, hope everybody help please.
I run gitlab
sudo docker run --detach --hostname gitlab.devopstraining.vn --publish 3080:80 --name gitlab_main --restart always --volume /srv/gitlab_main/config:/etc/gitlab --volume /srv/gitlab_main/logs:/var/log/gitlab --volume /srv/gitlab_main/data:/var/opt/gitlab \gitlab/gitlab-ce:latest
Because run hostname gitlab.devopstraining.vn when I click issue project (issue → boards) it redirect hostname:
Ex: gitlab.devopstraining.vn/root/a/-/issues/1 (true is 10.32.4.1111:3080root/a/-/issues/1)
I have tried to fix the hostname in a number of ways but with no success like:
Solution 1:
Exec to container gitlab change: external_url in file gitlab.rb when I edit:
external_url “http://10.32.4.111:3080”
and gitlab is die, I change url ohter gitlab is running true, but it’s die issue because redirect hostname not found.
Solution 2:
I change config file container in
/var/lib/docker/container/<container_id>
Ang it’s not working when I change hostname to 10.32.4.111:3080 (address other is run)
Solution 3:
I run new container with image above
When run with hostname
Ex: docker run —hostname=“localhost:8080” -dp 8080:80 <image_name>
Container not working
When run non hostname container is run true
I hope set default hostname follow port built (3080) or set hostname to “10.32.4.111:3080” (address gitlab) and not create new container.
Anyone who has encountered this issue before can support me. thank all !!