1
votes

I use docker install gitlab.

Step 1: docker run -d
-p 8023:443
-p 8020:80
-p 8022:22
--name gitlab
--restart always
-v /home/gitlab/config:/etc/gitlab
-v /home/gitlab/logs:/var/log/gitlab
-v /home/gitlab/data:/var/opt/gitlab
gitlab/gitlab-ce

step 2: vi /home/gitlab/config/gitlab.rb
external_url 'http://192.168.71.5'
gitlab_rails['gitlab_ssh_host'] = '192.168.71.5'
gitlab_rails['gitlab_shell_ssh_port'] = 8022

step 3: docker exec -it gitlab /bin/bash
gitlab-ctl reconfigure
docker restart gitlab

When I add a new project new-test in gitlab. Then open http://192.168.71.5:8020/root/new-test with chrome. The Clone with HTTP is http://192.168.71.5/root/new-test.git. when use git clone http://192.168.71.5/root/new-test.git. There is something wrong.

fatal: unable to access 'http://192.168.71.5/root/new-test.git/': Failed connect to 192.168.71.5:80; Connection refused
enter image description here

why the Clone with HTTP is not http://192.168.71.5:8022/root/new-test.git?

1

1 Answers

0
votes
-p 8023:443
-p 8020:80
-p 8022:22

should be

docker run -d
-p 443:8023
-p 80:8020
-p 22:8022