I have a gitlab server that can be started up with a docker-compose.yml
file.
The gitlab server runs on a Macbook Pro computer.
There are 3 volumes inside the docker-compose.yml
file.
volumes:
- './config:/etc/gitlab'
- './logs:/var/log/gitlab'
- './data:/var/opt/gitlab'
Today I want to try if the volumes can be changed to an NFS of a Synology NAS.
So I type the following commands to create a mount point.
sudo mkdir /Volumes/my-backup
sudo mount -t nfs -o resvport,rw nas.mydomain:/volume1/my-backup /Volumes/my-backup
Then I change the volumes section of docker-compose.yml
file to this:
volumes:
- '/Volumes/my-backup/gitlab-mount-volume/config:/etc/gitlab'
- '/Volumes/my-backup/gitlab-mount-volume/logs:/var/log/gitlab'
- '/Volumes/my-backup/gitlab-mount-volume/data:/var/opt/gitlab'
/Volumes/my-backup/gitlab-mount-volume/data/
folder contains the files that are created with cp -a ./data/* /Volumes/my-backup/gitlab-mount-volume/data/
command.
-a
option can preserve the owner, group, and permissions of all the copied files.
Then I see the following error messages after running docker compose up
command
gitlab-service-web-1 | ---- Begin output of chgrp git /var/opt/gitlab/git-data/repositories ----
gitlab-service-web-1 | STDOUT:
gitlab-service-web-1 | STDERR: chgrp: changing group of '/var/opt/gitlab/git-data/repositories': Operation not permitted
gitlab-service-web-1 | ---- End output of chgrp git /var/opt/gitlab/git-data/repositories ----
gitlab-service-web-1 | Ran chgrp git /var/opt/gitlab/git-data/repositories returned 1
Why does chgrp
command generates an Operation not permitted
error inside the docker container?
I've run cat /etc/export
command to check that the mount point contains no_root_squash
option.
192.168.123.123(rw,async,no_wdelay,crossmnt,insecure,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745628419a4636953.html
评论列表(0条)