3

I'm running a gitlab docker image on Ubuntu server. docker is started through a systemd service. the command is:

docker run --hostname example  -p 9401:80 -p 9402:443 -p 9403:22  --name gitlab   --volume /srv/gitlab/data:/var/opt/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --env GITLAB_OMNIBUS_CONFIG="external_url ='example:9401';gitlab_rails['gitlab_port'] = 9401; gitlab_rails['gitlab_shell_ssh_port']=9403;" example:9104/gitlab/gitlab-ce:10.4.3-ce.0

SSH url

ssh://git@example:9403/root/test.git

HTTP url

http://example/root/test.git
  • How to show http and https port in git url, just like the ssh url? I need port 9401 to be visible in http git url
2
  • 443 and 80 default port and these port not show in url if your port is differnt then try example:port/root/test.git Commented Apr 5, 2018 at 7:16
  • @Adiii ah ok thank you, I spent all day yesterday trying to make it show. If you are sure of your answer please post it as an answer so I can accept it Commented Apr 5, 2018 at 7:17

1 Answer 1

1

Your ssh port is different that's why you mention in URL

ssh://git@example:9403/root/test.git.

The default port for HTTP is80 and for HTTPS is443 so you do not need to mention in URL.

If you Map TCP port 80 in the container to port 80 on the Docker host so this will be accessible without mentioning port in the URL.

If you map rather then 80 like you mentioned 9401:80 then you can try something like this.

http://example:PORT/root/test.git 

or

http://example:9401/root/test.git
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.