This guide uses Docker Compose to run GitLab CE.
For Docker installation, see Docker.
mkdir -p /opt/gitlab
cd /opt/gitlab
Create a docker-compose.yml file:
services:
gitlab:
image: gitlab/gitlab-ce:latest
container_name: gitlab
restart: unless-stopped
hostname: gitlab.example.com
ports:
- "80:80"
- "443:443"
- "2222:22"
volumes:
- ./gitlab/config:/etc/gitlab
- ./gitlab/logs:/var/log/gitlab
- ./gitlab/data:/var/opt/gitlab
shm_size: '256m'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
docker compose up -d
Note: Initial startup may take 5-10 minutes as GitLab performs database migrations and initial setup.
https://gitlab.example.com./gitlab/config/initial_root_password)gitlab/gitlab-ceGITLAB_OMNIBUS_CONFIG for your environmentAny questions?
Feel free to contact us. Find all contact information on our contact page.