我刚刚在运行64位Raspberry OS的RPI4上冒险进入了Docker的世界。我尝试使用以下命令设置GitLab
this
docker镜像。我已将CIFS装载到NAS机箱
//NAS-IP/gitlab /mnt/gitlab cifs username=xxx,password=xxx,iocharset=utf8,rw,file_mode=0777,dir_mode=0777 0 0
我使用它作为提供给GitLab容器的存储卷,我使用以下方式设置了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技能修复的吗?我能尝试做什么?