Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 2.01 KB

README.md

File metadata and controls

67 lines (44 loc) · 2.01 KB

Alpine Gitlab Docker

Build Status

Alpine Linux based docker image and tools for Gitlab.

Why another Gitlab docker image?

  • Completely based on Alpine Linux (no static binaries)
  • Use separate docker images for services (where possible)
  • Optimized for size
  • Bundle services with docker compose

Setup

To get Gitlab up and running you need to first generate 2 secrets and provide then as environment variables. Most suitable is via .env file in alongside your docker-compose file. Mandatory variables are:

  • GITLAB_HOSTNAME
  • GITLAB_ROOT_PASSWORD
  • POSTGRES_PASSWORD
  • POSTGRES_USER

After which you need to create and bring up the containers

docker-compose up

Watch the output on console for errors. It will take some time to generate the db and update permissions. Ones its done without errors you can Ctrl+c to stop the containers and start them again in the background.

Access the application

Visit your Gitlab instance at http://dockerhost

Configuration

The default configuration is very limited. The custom configuration is stored in /etc/gitlab in the container and will be copied to the config directory inside /home/git/gitlab/config. Any new configuration added will be automatically copied to the container. Any existing configuration will not be overwritten.

Location of the configuration on the host depends on the volume settings. the default locations is:

cd /srv/docker/gitlab/config

Modify a configuration file and restart the containers.

Additional functions

The entrypoint command has some additional function. To show them run:

docker-compose exec gitlab entrypoint.sh help

Backups

To exclude some items from the backup you can set the environment variable $GITLAB_BACKUP_SKIP which will set SKIP= see: https://docs.gitlab.com/ee/raketasks/backup_restore.html