Confirm that an active installation of Docker is installed.
Install inside Docker
docker pull gitlab/gitlab-ce
Start Docker service
sudo systemctl enable --now docker
Add current user to docker user group so that he does not have to use sudo every now and then.
sudo gpasswd -a $USER docker
The following command will start GitLab. Note that –restart always will restart the container at system startup.
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 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
- Go to 0.0.0.0
In a future post, I’ll show how to connect it to the LDAP server.