Docker
The following guide is to get starting using a “Dockerized” version of GitLab. If you have an Omnibus installation (Linux Installation), see this guide.
-
Start GitLab
Start a containerized version of GitLab using your local GDK
Terminal window docker run \-d \-p 8080:80 \--name gitlab \-v ./scripts/data_seeder:/opt/gitlab/embedded/service/gitlab-rails/scripts/data_seeder \-v ./ee/db/seeds/data_seeder:/opt/gitlab/embedded/service/gitlab-rails/ee/db/seeds/data_seeder \-v ./ee/lib/tasks/gitlab/seed:/opt/gitlab/embedded/service/gitlab-rails/ee/lib/tasks/gitlab/seed \-v ./spec:/opt/gitlab/embedded/service/gitlab-rails/spec \-v ./ee/spec:/opt/gitlab/embedded/service/gitlab-rails/ee/spec \gitlab/gitlab-ee:16.9.8-ee.0Start a containerized version of GitLab
Terminal window docker run \-p 8080:80 \--name gitlab \-d \gitlab/gitlab-ee:17.1.6-ee.0 -
Globalize test gems
Make the test gems available in the “production” environment for seeding
Terminal window docker exec gitlab bash -c "cd /opt/gitlab/embedded/service/gitlab-rails; ruby scripts/data_seeder/globalize_gems.rb; bundle install" -
Import Test Resources
Make the test resources available in the “production” environment for seeding
Terminal window docker exec gitlab bash -c "wget -O - https://gitlab.com/gitlab-org/gitlab/-/raw/master/scripts/data_seeder/test_resources.sh | REF=master bash" -
Get the root password
To sign into the GitLab instance, you must fetch the root password from the container.
Execute the following to retrieve the password:
Terminal window docker exec gitlab cat /etc/gitlab/initial_root_password -
Seed the Data
Seed the default seed file that ships with GitLab.
Terminal window docker exec -it gitlab gitlab-rake "ee:gitlab:seed:data_seeder[beautiful_data.rb]"You can specify a custom seed file by mounting the seed file in Step 1 into the container and providing the path to it.
If the seed file is in
ee/db/seeds/data_seeder/your_seed_file.rb
, then the file should be mounted already from Step 1.Terminal window docker exec -it gitlab gitlab-rake "ee:gitlab:seed:data_seeder[your_seed_file.rb]" -
Explore the Data
At this point, your data should be available for viewing.
Navigate to
http://localhost:8080/
to explore the seeded data.- Username:
root
- Password: password from step 4
The group will be available in the Groups page
- Username: