Skip to content

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.

  1. 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.0
  2. 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"
  3. Import Test Resources

  4. 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
  5. 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]"
  6. Explore the Data

    At this point, your data should be available for viewing.

    Navigate to http://localhost:8080/ to explore the seeded data.

    The group will be available in the Groups page