Skip to content

Instantly share code, notes, and snippets.

@Abreto
Created December 4, 2019 10:11
Show Gist options
  • Save Abreto/5c6d84dd0b9884ff5c2acabdbea526f2 to your computer and use it in GitHub Desktop.
Save Abreto/5c6d84dd0b9884ff5c2acabdbea526f2 to your computer and use it in GitHub Desktop.
Run GitLab in Docker (for Mac)
version: "3"
services:
web:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'Abreto-MacBook-Pro.local'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://Abreto-MacBook-Pro.local:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
ports:
- '8929:8929'
- '2224:22'
volumes:
- 'gitlab-config:/etc/gitlab'
- 'gitlab-logs:/var/log/gitlab'
- 'gitlab-data:/var/opt/gitlab'
volumes:
gitlab-config:
gitlab-logs:
gitlab-data:
#!/usr/bin/env bash
docker run --detach \
--hostname $(hostname -f) \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://$(hostname -f):8929/'; gitlab_rails['gitlab_shell_ssh_port'] = 2224" \
--publish 8929:8929 --publish 2224:22 \
--name gitlab \
--volume gitlab-config:/etc/gitlab \
--volume gitlab-logs:/var/log/gitlab \
--volume gitlab-data:/var/opt/gitlab \
gitlab/gitlab-ee:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment