admin管理员组文章数量:1025532
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)
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)
本文标签: gitlabUnable to run chgrp inside a docker container that mounts to an NFSStack Overflow
版权声明:本文标题:gitlab - Unable to run chgrp inside a docker container that mounts to an NFS - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745628418a2160008.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论