I think I am following the official instructions: https://docs.gitlab.com/omnibus/docker/#getting-help, but the container can not start properly.
- Download macOS version docker from docker official site and install it.
$ docker pull gitlab/gitlab-ce
- Add the 3 gitlab diretory to File Sharing in docker preferences
- Start docker:
$ sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
- But the container’s status is always “restarting”
0304435ab2f7 gitlab/gitlab-ce:latest "/assets/wrapper" 5 hours ago Restarting (1) Less than a second ago gitlab
- Check the log
$ docker logs gitlab
and Find an error:
Preparing services...
mkdir: cannot create directory '/var/log/gitlab/sshd': Permission denied
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=9.5.4-ce.0
- I make the directory above but still get the same error; And found that /var is linked to /private/var in macOS, is that the reason that make gitlab can not find the directory “/var/log/gitlab/sshd” I’ve made? SIP of my macOS is disabled.
Am I doing something wrong? How can I fix it