根据文档,我试图在我的语法NAS上安装带有docker和我自己的docker-compose.yml文件的gitlab
当我在我的语法(与终端)上运行这个文件时,退出代码1出现了一个错误:
运行/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys检查-返回的权限1
如何配置我的目录或停靠-撰写文件以更正此错误?
我已经在数据&日志和配置上执行了chmod -R 777和chown -R root:root。
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab容器退出失败(返回1),错误如下:
2019年-02-10T08:15:49+00:00信息:在重新引发异常之前运行排队的延迟通知2019-02-10T08:15:49+00:00错误:运行异常处理程序2019-02-10T08:15:49+00:00错误:异常处理程序完成2019-02-10T08:15:49+00:00致命: /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out 209-02-10T08:15:49+00:00致命:如果您提交错误,请提供stacktrace.out文件的内容。报告2019-02-10T08:15:49+00:00但从/opt/收到了“1”- /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys检查的开始输出-权限- STDOUT: STDERR: /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:30:in
initialize': Permission denied @ rb_sysopen - /var/log/gitlab/gitlab-shell/gitlab-shell.log (Errno::EACCES) from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:30:inopen‘from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:30:ininitialize' from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:120:innew’gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:120:in<top (required)>' from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_keys.rb:4:inrequire_relative从/opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_keys.rb:4:in<top (required)>' from /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys:24:in需要‘from /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys:24:in’- /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-的最终输出键检查-权限--运行/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys检查-返回权限1
发布于 2019-02-11 17:34:04
我已经复制了您的设置,最后一次从码头日志(web_container_id)提供的输出是
=> /var/log/gitlab/gitlab-rails/sidekiq_exporter.log <==
[2019-02-11 17:16:20] 127.0.0.1 - - [11/Feb/2019:17:16:20 UTC] "GET /metrics HTTP/1.1" 200 1298 "-" "Prometheus/2.5.0"您的问题与从执行停靠器的用户访问您的目录有关,因为它从文件夹继承权限,而/srv文件夹是超级用户文件夹。
您为linux上的坞安装做了后置配置?
https://docs.docker.com/install/linux/linux-postinstall/
除此之外,还需要确保您的主机目录对执行docker-的用户是可访问的,之后,它也将无法工作。您说您使用chown -R根目录: chmod 777之后的根?如果您在没有根的情况下运行,它将不会产生任何效果。
Dockerfile:
version: "3"
services:
web:
image: gitlab/gitlab-ce:latest
restart: always
hostname: gitlab.example.com
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
ports:
- 80:80
- 443:443
- 22:22
volumes:
- /srv/gitlab/config:/etc/gitlab
- /srv/gitlab/logs:/var/log/gitlab
- /srv/gitlab/data:/var/opt/gitlabhttps://stackoverflow.com/questions/54614682
复制相似问题