Docker GitLab CI

GitLab CI dockerized

View the Project on GitHub sameersbn/docker-gitlab-ci

Zero to GitLab CI in 5 seconds or less*

The quickest way to get started is using docker-compose.

wget https://raw.githubusercontent.com/sameersbn/docker-gitlab-ci/master/docker-compose.yml
docker-compose up

Alternately, you can manually launch the gitlab-ci container and the supporting postgresql and redis containers by following this three step guide.

Step 1. Launch a postgresql container

docker run --name=postgresql-gitlab-ci -d \
  --env='DB_NAME=gitlabhq_production' \
  --env='DB_USER=gitlab' --env='DB_PASS=password' \
  --volume=/srv/docker/gitlab-ci/postgresql:/var/lib/postgresql \
  sameersbn/postgresql:9.4

Step 2. Launch a redis container

docker run --name=redis-gitlab-ci -d \
  --volume=/srv/docker/gitlab-ci/redis:/var/lib/redis \
  sameersbn/redis:latest

Step 3. Launch the gitlab-ci container

docker run --name=gitlab-ci -d \
  --link=postgresql-gitlab-ci:postgresql --link=redis-gitlab-ci:redisio \
  --publish=10081:80 \
  --env='GITLAB_CI_PORT=10081' --env='GITLAB_URL=http://localhost:10080' \
  --env='GITLAB_APP_ID=xxx' --env='GITLAB_APP_SECRET=yyy' \
  --volume=/srv/docker/gitlab-ci/gitlab-ci:/home/gitlab_ci/data \
  sameersbn/gitlab-ci:7.10.4

Point your browser to http://localhost:10081 and login using your GitLab credentials.

You should now have the GitLab CI ready for testing. Please refer the docs for customization options.

* download and start up times not included