Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

GitLab Tutorials: Install self-managed GitLab Enterprise in Docker Container


URL – https://docs.gitlab.com/ee/install/docker.html


Step 1 – Set up the volumes location

$ export GITLAB_HOME=/opt/gitlab

The GitLab container uses host mounted volumes to store persistent data:

Step 2 – Install GitLab using Docker Engine


sudo docker run --detach \
  --hostname gitlab.example.com \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume $GITLAB_HOME/config:/etc/gitlab \
  --volume $GITLAB_HOME/logs:/var/log/gitlab \
  --volume $GITLAB_HOME/data:/var/opt/gitlab \
  --shm-size 256m \
  gitlab/gitlab-ee:latest

$ sudo docker logs -f gitlab

Step 3 – Access gitab

After starting a container you can visit gitlab.example.com (or http://192.168.59.103 if you used boot2docker on macOS). It might take a while before the Docker container starts to respond to queries.

Visit the GitLab URL, and log in with username root and the password from the following command:

sudo docker exec -it gitlab grep ‘Password:’ /etc/gitlab/initial_root_password

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x