August 2019
Beginner
608 pages
16h 7m
English
Using the same --publish mechanism, you can specify not only the port but also the IP address that Docker will use.
To run the latest GitLab CE on IP-address 192.168.1.1, use the following command:
sudo docker run --detach \ --hostname gitlab.joustie.nl \ --publish 192.168.1.1:443:443 \ --publish 192.168.1.1:80:80 \ --publish 192.168.1.1:22: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
Now, GitLab is accessible at http://192.168.1.1 and https://192.168.1.1. A docker-compose.yml example that uses different ports can be found in the Install GitLab using Docker ...
Read now
Unlock full access