- Start the containers with
docker-compose up
; - Create Gitlab database with
docker-compose exec postgresql createdb -U postgres gitlabhq_production
; - Open http://localhost:1080 and set your root password;
- Log in as a user
root
with the new password; - Open http://localhost:1080/admin/users/new and create a new admin user;
- Edit the new user and set password;
- Log out and log in as a new user;
- Update a password if prompted;
- Open http://localhost:1080/admin/runners.
- Copy runner registration token;
- Execute
docker-compose exec gitlab-runner gitlab-runner register
; - When prompted, enter:
http://gitlab:1080
as GitLab coordinator URL;- Token obtained at step 10 as gitlab-ci token;
- Any value as a description;
- Any tags;
docker
as executor;ruby:2.3
as default container;
- Edit
runner/config/config.toml
file; - Add
clone_url = "http://gitlab:1080"
in the[[runners]]
section; - Add
network_mode = "gitlab_default"
in the[runners.docker]
section; - Open http://localhost:1080/admin/runners/1;
- Select
Active
,Run untagged jobs
checkboxes; - Unselect
Protected
andLock to current projects
checkboxes.