Install GitLab with Docker
- Create file
docker-compose.yamlwith following content:
version: "3.8"
services:
gitlab:
image: "gitlab/gitlab-ce:latest"
container_name: gitlab
restart: always
hostname: "gitlab.local"
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.local'
gitlab_rails['initial_root_password'] = 'Gb%GRhqQxp9%@ChX'
ports:
- "80:80"
- "443:443"
- "2222:22"
volumes:
- "/opt/gitlab/config:/etc/gitlab"
- "/opt/gitlab/logs:/var/log/gitlab"
- "/opt/gitlab/data:/var/opt/gitlab"
networks:
gitlab-network:
aliases:
- gitlab.local
networks:
gitlab-network:
driver: bridge
- Run
docker-compose up -d - Open browser and go to
http://localhostyou can use
gitlab.localinstead after update hostname file inC:\Windows\System32\Drivers\etc\hosts - Login with username
adminand passwordGb%GRhqQxp9%@ChX - You'll see the dashboard like img below
