Developer Cookies Blog

Setup Gitlab on Docker

Gitlab is a common wide-used DevOp platform. The platform contains source code management, CI/CD, security, and more features to deliver software rapidly. It pretty easy to run gitlab on-premise or somwhere in the cloud within a docker container. The following part of this text explains the setup.

Remarks: Probably you will need an encrypted website (see article: Generate and renew Let’s Encrypt Certificates for Apache with Certbot Docker container).

  1. Prerequisite: You need a fully running docker platform
  2. Pull Gitlab
    docker pull gitlab/gitlab-ce
  3. Configure and start docker container
    docker run --detach -p -p -p --restart always  -v /<somepath>/config:/etc/gitlab -v /<somepath>/logs:/var/log/gitlab -v /<somepath>/data:/var/opt/gitlab --hostname <some_hostname> --name gitlab-ce gitlab/gitlab-ce:latest
  4. Add ProxyPass into corresponding Apache virtual host configuration file
    ProxyPass / retry=0
    ProxyPassReverse /
  5. Proceed with the webinterface of gitlab

Related Articles