【发布时间】:2021-06-01 09:57:10
【问题描述】:
我刚刚在运行 64 位版本的 Raspberry OS 的 RPI4 上冒险进入了 Docker 世界。我尝试使用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 上的 Portainer 站点,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 1
GitLab 容器已将内容写入配置、日志和数据卷,因此它具有写入权限。
使用我相对有限的 linux 技能可以解决这个问题吗?我可以尝试做什么?
【问题讨论】:
标签: docker gitlab raspberry-pi4 raspberry-os