🌐
DEV Community
dev.to › teetoflame › setting-up-a-gitlab-server-community-edition-and-a-gitlab-runner-using-docker-compose-ob6
Setting Up a GitLab Server (Community Edition) and a GitLab Runner Using Docker Compose - DEV Community
February 20, 2025 - sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose ... version: '3.8' services: gitlab-server: image: 'gitlab/gitlab-ce:latest' container_name: gitlab-server hostname: 'gitlab.example.com' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://<your-ec2-public-ip>:8088' # Put the IP of your server gitlab_rails['initial_root_password'] = "my_secure_password" # Set your initial root password here ports: - '8088:8088' # Expose GitLab on port 8088 volumes: - ./config:/etc/gitlab # Persist GitLab con
🌐
Medium
medium.com › @BuildWithLal › gitlab-setup-using-docker-compose-a-beginners-guide-3dbf1ef0cbb2
Setup GitLab Using Docker Compose: A Beginner’s Guide | by Lal Zada | Medium
October 10, 2024 - First it will do docker pull gitlab/gitlab-ce if the gitlab/gitlab-ce docker image does not exist on your local machine. After pulling the docker image, it will do docker run gitlab/gitlab-ce · So you can see how docker compose combines 2 separate commands into a single YAML file.
🌐
GitHub
github.com › hutchgrant › gitlab-docker-local
GitHub - hutchgrant/gitlab-docker-local: Install, configure, and run Gitlab CE and Gitlab-Runner in local docker containers via docker-compose. · GitHub
You will also want to make the network alias for the GitLab container your hostname ... You may choose to edit the preferred ports for this example above but if you choose to do that you'll need to change the ports part of the docker-compose.yml as well as the external_url and registry_external_url.
Starred by 30 users
Forked by 13 users
Languages: Shell 73.4% | Dockerfile 26.6%
🌐
Atlantic.Net
atlantic.net › home › blog › how to install gitlab with docker and docker compose on arch linux
How to install GitLab with Docker and Docker Compose on Arch Linux
June 2, 2024 - version: '3.7' services: web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'localhost' container_name: gitlab-ce environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://localhost' ports: - '8080:80' - '8443:443' volumes: - '$GITLAB_HOME/config:/etc/gitlab' - '$GITLAB_HOME/logs:/var/log/gitlab' - '$GITLAB_HOME/data:/var/opt/gitlab' networks: - gitlab gitlab-runner: image: gitlab/gitlab-runner:alpine container_name: gitlab-runner restart: always depends_on: - web volumes: - /var/run/docker.sock:/var/run/docker.sock - '$GITLAB_HOME/gitlab-runner:/etc/gitlab-runner' networks: - gitlab networks: gitlab: name: gitlab-network · Save and close the file when you are done. At this point, the docker-compose.yml file is ready to start the GitLab container.
🌐
GeeksforGeeks
geeksforgeeks.org › git › install-gitlab-by-using-docker
Install GitLab By Using Docker - GeeksforGeeks
July 23, 2025 - It includes features like version ... In this article, we will walk you through the steps to install GitLab using Docker. Before you begin, make sure you have the following: A system with Docker and Docker Compose installed....
🌐
DevOps in the clouds
czerniga.it › strona główna › how to install gitlab using docker compose?
How to install GitLab using Docker Compose?
September 26, 2022 - Once launched, Docker will download GitLab and GitLab Runner images from the servers. On my computer it looked like this: ... To log in to GitLab for the first time, you need a temporary password, which is generated automatically during installation.
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
How to use Docker Compose In Gitlab CI - GitLab CI/CD - GitLab Forum
January 2, 2024 - What are valid way to run docker compose inside a Gitlab CI. As I have tried to go with:| docker-compose-playgroound: stage: docker-compose-playgroound image: docker:18 services: - docker:18-dind tags: - docker-main variables: DOCKER_TLS_CERTDIR: "" DOCKER_HOST: tcp://docker:2375 script: - docker compose -f .gitlab/docker-compose-autotests.yml up However it has resulted in error: $ docker compose -f .gitlab/docker-compose-autotes...
Find elsewhere
🌐
Readthedocs
mysticons-test.readthedocs.io › en › latest › gitlab_compose-container_guide.html
Setting up GitLab with Docker — mysticons-test latest documentation
Test the installation: sudo docker-compose --version · Create docker-compose.yml file: sudo nano docker-compose.yml · Insert to file (remember to edit extrenal_url!): web: image: 'gitlab/gitlab-ee:latest' restart: always hostname: '' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'http://YOUR IP HERE' # Add any other gitlab.rb configuration here, each on its own line ports: - '80:80' - '443:443' - '22:22' volumes: - '/srv/gitlab/config:/etc/gitlab' - '/srv/gitlab/logs:/var/log/gitlab' - '/srv/gitlab/data:/var/opt/gitlab' To start GitLab run the following command in same folder where docker-compose.yml is: sudo docker-compose up -d ...
🌐
DevOps Compass
heyvaldemar.com › home › self-hosting › install gitlab using docker compose
Install GitLab Using Docker Compose | VALDEMAR
August 22, 2023 - If you have created these records recently, you should wait before starting the installation of the services. Full replication of these records between DNS servers can take from a few minutes to 48 hours or even longer in rare cases. ... Docker Engine and Docker Compose must be installed on the server.
🌐
YouTube
youtube.com › watch
How to Install GitLab Using Docker Compose - Full Setup Guide - YouTube
↳👋🏾 I’m back with another tutorial📺, which is for installing GitLab using Docker Compose. 📽️ In this video, I’ll guide you through the entire process of ...
Published: September 26, 2024
🌐
GitHub
gist.github.com › benoitpetit › cbe19cdd369ec8c1e0defd245d91751f
complete Gitlab installation and a runner with docker · GitHub
Thanks! :-) I found an auto register version for the runner for inspiration of your work and this combined might be helpful for those passing by: https://gitlab.com/TyIsI/gitlab-runner-docker-compose/-/blob/main/docker-compose.yml?ref_type=heads
🌐
GitLab
docs.gitlab.com › gitlab docs › install › installation methods › docker › configure
Configure GitLab running in a Docker container | GitLab Docs
You can see a docker-compose.yml ... in the Docker compose section. GitLab defaults to using two database connections that point to the same PostgreSQL database. If, for any reason, you wish to switch back to single database connection: ... After you configure your installation, consider ...
🌐
Medium
medium.com › @mudasirhaji › installing-gitlab-self-managed-instance-on-aws-ec2-using-docker-compose-a-step-by-step-guide-c3843564b832
Installing GitLab Self-Managed Instance on AWS EC2 Using Docker Compose: A Step-by-Step Guide | by Mudasir | Medium
October 21, 2023 - Before diving into GitLab setup, let’s ensure your AWS EC2 instance is equipped with Docker and Docker Compose. ... sudo yum update -y sudo amazon-linux-extras install docker sudo systemctl start docker sudo usermod -aG docker ec2-user sudo systemctl enable docker
🌐
HowtoForge
howtoforge.com › home › how to install gitlab with docker on ubuntu 20.04 lts
How to Install GitLab with Docker on Ubuntu 20.04 LTS
Create the new 'docker-compose.yml' file using the vim command below. ... Define the service named "web" with the image of "gitlab-ce" latest version, and change the "hostname" with your GitLab domain name. web: image: 'gitlab/gitlab-ce:latest' ...
🌐
GitHub
github.com › diffblue › gitlab › blob › master › doc › install › docker.md
gitlab/doc/install/docker.md at master · diffblue/gitlab
To create a new container with GitLab EE, replace ce with ee in your docker run command or docker-compose.yml file.
Author: diffblue
Top answer
1 of 11
120

EDIT (2023): Do not keep using docker-compose! Please migrate to docker compose, which is now part of the docker image and a 99% drop-in replacement of docker-compose. Ironically, if you (now) use docker:latest, the question does not apply. See Docker's documentation on Compose V2. The answer below only applies to docker-compose, AKA Compose V1, which is to be discontinued/become unsupported.


Docker also provides an official docker-compose image: docker/compose

This is the ideal solution if you don't want to install it every pipeline.

Note that in the latest version of GitLab CI/Docker you will likely need to give privileged access to your GitLab CI Runner and configure/disable TLS. See Use docker-in-docker workflow with Docker executor

variables:
  DOCKER_HOST: tcp://docker:2375/
  DOCKER_DRIVER: overlay2

# Official docker compose image.
image:
  name: docker/compose:latest

services:
  - docker:dind

before_script:
  - docker version
  - docker-compose version

build:
  stage: build
  script:
    - docker-compose down
    - docker-compose build
    - docker-compose up tester-image

Note that in versions of docker-compose earlier than 1.25:

Since the image uses docker-compose-entrypoint.sh as entrypoint you'll need to override it back to /bin/sh -c in your .gitlab-ci.yml. Otherwise your pipeline will fail with No such command: sh

    image:
      name: docker/compose:latest
      entrypoint: ["/bin/sh", "-c"]
2 of 11
99

Following the official documentation:

# .gitlab-ci.yml
image: docker
services:
  - docker:dind    
build:
  script:
    - apk add --no-cache docker-compose
    - docker-compose up -d

Sample docker-compose.yml:

version: "3.7"
services:
  foo:
    image: alpine
    command: sleep 3
  bar:
    image: alpine
    command: sleep 3

We personally do not follow this flow anymore, because you loose control about the running containers and they might end up running endless. This is because of the docker-in-docker executor. We developed a python-script as a workaround to kill all old containers in our CI, which can be found here. But I do not suggest to start containers like this anymore.

Author: sameersbn
🌐
GitLab
docs.gitlab.com › omnibus › docker
Sign in · GitLab
Sign in to GitLab · By signing in you accept the Terms of Use and acknowledge the Privacy Statement and Cookie Policy · Don't have an account yet? Register now · or sign in with · Remember me · Explore Help About GitLab GitLab community forum · English · 日本語 · Gaeilge