Heptapod Docker Image

$ mkdir /tmp/t
$ GITLAB_HOME=/tmp/t
$ docker run --hostname gitlab.example.com --publish 80:80 --name gitlab --volume GITLAB_HOME/config:/etc/gitlab:Z --volume $GITLAB_HOME/logs:/var/log/gitlab:Z --volume $GITLAB_HOME/data:/var/opt/gitlab:Z octobus/heptapod:latest
$ ip=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" gitlab)
$ echo $i gitlab.example.com | sudo tee -a /etc/hosts
$ firefox http://gitlab.example.com

When it comes up it will ask to set the password of the root user. Maybe there is a way to set it up differently. When using the image gitlab/gitlab-ce:latest instead, the password is stored in the $GITLAB_HOME/config/initial_root_password instead which is more convenient for automation.

* GET http://gitlab.example.com/users/password/edit
* POST http://gitlab.example.com/users/password
* user[password] user[password_confirmation] user[reset_password_token]

Create a new admin user:

docker exec gitlab gitlab-rails runner "u = User.new(username: 'root1', email: 'root@example.com', name: 'root', password: 'Wrobyak4', password_confirmation: 'Wrobyak4') ; u.skip_confirmation! ; u.admin = true ; u.save!"

Set the root password:

docker exec gitlab gitlab-rails runner "user = User.find_by_username 'root'; user.password = 'Wrobyak4'; user.password_confirmation = 'Wrobyak4'; user.password_automatically_set = false ; user.save!"