- Published on
Instalar Gitlab CI con Docker
- Authors
- Name
- Claudio Mardones
- @cgmndev
Objetivo
Instalar Gitlab CI en contenedores Docker.
version: '3'
services:
gitlab:
image: gitlab/gitlab-ce:latest
container_name: gitlab
restart: always
hostname: HOSTNAME
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://HOSTNAME'
gitlab_rails['gitlab_shell_ssh_port'] = 2222
ports:
- "9500:80"
- "2222:22"
volumes:
- ./data/gitlab/config:/etc/gitlab
- ./data/gitlab/logs:/var/log/gitlab
- ./data/gitlab/data:/var/opt/gitlab
networks:
- web
runner:
image: gitlab/gitlab-runner:latest
container_name: gitlab-runner
restart: always
volumes:
- /srv/gitlab/runner/config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
networks:
- web
networks:
web:
external: true