GitLab-CI Docker container, now with persistent external MySQL.

Hear, hear..

My latest update of GitLab-CI1 Docker2 image now includes support for persistent external MySQL database in addition to standalone SQLite3.

Running GitLab-CI in Docker container is the easiest way to deploy GitLab's Continuous Integration software in your environment. It only requires a working Docker installation, which as of version 0.7 released November 26, 2013

has greater compatibility and runs on all linux distributions.

Simplest possible way to start your own GitLab-CI instance is to use stand-alone SQLite3 database:

docker run -d -e GITLAB_URLS="" \
           -p 9000 anapsix/gitlab-ci

NOTE: build-in SQLite3 database will be reinitilized every time you start new instance of the container image, thus is not recommended for production environment.

To start the instance with MySQL environment, you'll need a working MySQL server installation and credentials ready for container.

 docker run -d -e DEBUG=true \
               -e MYSQL_SETUP=true \
               -e MYSQL_HOST= \
               -e MYSQL_USER="gitlabci" \
               -e MYSQL_PWD="gitlabci" \
               -e MYSQL_DB="gitlabci" \
               -e GITLAB_URLS="" \
               -p 9000 anapsix/gitlab-ci

NOTE: MYSQL_SETUP=true is required only when you want to re-initialize MySQL database, such as during first time you start your instance connecting to DB described by credentials set via MYSQL_* environmental variables. E.G. every time you start container with MYSQL_SETUP=true it will wipe target DB and all project and runner settings will be lost.

Container image can downloaded from Docker Index:

Source code and additional instruction are available at GitHub:


[1]GitLab-CI is a popular open-source Continuous Integration server by GitLab.
[2]Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.