我刚刚在我的RPI4上冒险进入了Docker的世界,运行着64位版本的树莓派操作系统。我已经尝试使用this docker镜像来设置GitLab。我已将CIFS装载到我的NAS计算机
//NAS-IP/gitlab /mnt/gitlab cifs username=xxx,password=xxx,iocharset=utf8,rw,file_mode=0777,dir_mode=0777 0 0我将其用作提供给GitLab容器的存储卷,该容器是我使用以下命令设置的:
docker run -d \
-p 4443:443 -p 8080:80 -p 2222:22 \
--name gitlab \
--restart always \
-v /home/pi/GitLab/config:/etc/gitlab \
-v /home/pi/GitLab/logs:/var/log/gitlab \
-v /mnt/gitlab/data:/var/opt/gitlab \
ravermeister/gitlab我不确定是应该将所有三个卷都指向我的NAS设备,还是只指向数据卷(就像我在这里所做的那样)?
根据我在RPI4上的容器站点,GitLab容器运行正常/正在启动/正在运行,但是RPI4一次又一次地运行相同的GitLab进程,并且在GitLab日志文件(/home/pi/GitLab/logs/reconfigure)堆中,我可以看到容器中的某些东西失败了:
[2021-03-02T20:03:47+00:00] ERROR: Running exception handlers
[2021-03-02T20:03:47+00:00] ERROR: Exception handlers complete
[2021-03-02T20:03:47+00:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
[2021-03-02T20:03:47+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2021-03-02T20:03:47+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: storage_directory[/var/opt/gitlab/.ssh] (gitlab::gitlab-shell line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /var/opt/gitlab/.ssh] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chgrp git /var/opt/gitlab/.ssh ----
STDOUT:
STDERR: chgrp: changing group of '/var/opt/gitlab/.ssh': Operation not permitted
---- End output of chgrp git /var/opt/gitlab/.ssh ----
Ran chgrp git /var/opt/gitlab/.ssh returned 1GitLab容器已将内容写入配置、日志和数据卷,因此它具有写入权限。
这是可以用我相对有限的linux技能来修复的吗?我可以尝试做些什么?
发布于 2021-03-03 12:14:18
GitLab正在尝试更改.ssh文件夹的组所有权。
容器在GitHub上的manifest中已经有关于ACL和组权限的警告:
“如果您在docker主机上使用文件GitLab,docker^1组需要对卷具有完全访问权限才能使ACL正常工作。...”
所以,我们先来看看这个。
如果您无法清除主机上已挂载的文件夹/mnt/gitlab/data (应该包含容器尝试更改的.ssh的文件夹),下一行是检查主机上.ssh的当前组以及容器中的预期内容,然后尝试在容器外部进行更改。根据ACL文件,我希望是组docker。
https://stackoverflow.com/questions/66446475
复制相似问题