Docker Community Forums

Share and learn in the Docker community.

Install gitlab with docker compose

docker

(Ivanprakasa) #1

I tried to install Gitlab with docker compose. I set docker-compose.

gitlab:
image: 'gitlab/gitlab-ce:latest’
volumes:
- ‘/srv/docker/gitlab/data:/var/opt/gitlab’
- ‘/srv/docker/gitlab/config:/etc/gitlab’
- '/srv/docker/gitlab/logs:/var/log/gitlab’
ports:
- “10080:10080”
- “10443:443”
- "10022:22"
restart: always
hostname: '1.1.1.1’
dns:
- xx.xx.xx.xx
environment:
GITLAB_OMNIBUS_CONFIG: |
gitlab_rails[‘gravatar_enabled’] = false
gitlab_rails[‘time_zone’] = ‘Asia/Tokyo’

When I run docker-compose up it failed said

gitlab_1 | If this container fails to start due to permission problems try to fix it by executing:
gitlab_1 |
gitlab_1 | docker exec -it gitlab update-permissions
gitlab_1 | docker restart gitlab
gitlab_1 |
gitlab_1 | Installing gitlab.rb config…
gitlab_1 | cp: cannot create regular file ‘/etc/gitlab/gitlab.rb’: Permission denied
gitlab_gitlab_1 exited with code 1

as written I tried to run

docker exec -it gitlab update-permissions
But error said Error response from daemon: No such container: gitlab

Anyone can help? Even I change permission “/etc/gitlab/gitlab.rb” and all volumes folder permission to 777, still same error.

Just info docker ps

Result:

CONTAINER ID IMAGE COMMAND CREATED
xxxxxxx gitlab/gitlab-ce:latest “/assets/wrapper” 24 hours ago