How to run gitlab from docker

  Uncategorized
export GITLAB_HOME=/srv/gitlab


sudo docker run --detach \
--hostname gitlab.example.com \
--publish 60443:443 --publish 60080:80 --publish 60022: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 \
gitlab/gitlab-ce:latest


docker logs gitlab -f

Access your server using the publish port: http://server-ip-here:60443

Get your root password:

sudo cat /srv/gitlab/config/initial_root_password

and log in.

Make these changes at first login:

Settings -> general -> sign-up restrictions - uncheck "Sing-up enabled" -> Save Changes