Skip to content

Update docker installation path in documentation

What does this MR do?

While creating a docker container in macOS the following command fails

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

With the error below

docker: Error response from daemon: Mounts denied: 
The paths /srv/gitlab/data and /srv/gitlab/logs and /srv/gitlab/config
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.

The problem is the /srv/ folder does not exist and as of macOS Catalina, the root directory / is read only so it's not possible to create the said folders.

Related issues

This issue is similar to #3538 (closed) and how-to-install-on-macos-with-docker.

My suggestion is to set a path variable $GITLAB_HOME pointing to the installation path which gives the user or admin freedom to set the path they would like to use and before starting the installation ensure that appropriate permissions are granted.

Checklist

See Definition of done.

  • Documentation created/updated
  • MR targeting master branch
  • MR has a green pipeline on GitLab.com

Reviewer Checklist

In addition to above, reviewer must:

  • Pipeline is green on dev.gitlab.org if the change is not touching documentation or internal cookbooks
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading