I want to run Gitlab using docker on windows 10, but cannot access the service.
I am using docker composer with the configuration file
version: '3.6'
services:
web:
image: 'gitlab/gitlab-ce'
restart: always
hostname: 'mygitlab.local'
container_name: gitlab-ce
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://mygitlab.local'
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- F:/gitlab/docker_data/config:/etc/gitlab
- F:/gitlab/docker_data/logs:/var/log/gitlab
- F:/gitlab/docker_data/data:/var/opt/gitlab
shm_size: '256m'
networks:
- gitlab
gitlab-runner:
image: gitlab/gitlab-runner:alpine
container_name: gitlab-runner
restart: always
depends_on:
- web
volumes:
- 'F:/gitlab/docker_data/docker.sock:/var/run/docker.sock'
- 'F:/gitlab/docker_data/gitlab-runner:/etc/gitlab-runner'
networks:
- gitlab
networks:
gitlab:
name: gitlab-network
Gitlab is started running docker compose up -d
. Looking at docker desktop the container are running. But I cannot access the server using firefox.
The file C:\WINDOWS\System32\drivers\etc\hosts
also contains 127.0.0.1 mygitlab.local
.
Copyright Notice:Content Author:「Johan」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74853733/gitlab-in-docker-on-windows