首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何配置停靠器-编写卷访问授权

如何配置停靠器-编写卷访问授权
EN

Stack Overflow用户
提问于 2019-02-10 08:30:18
回答 1查看 814关注 0票数 1

根据文档,我试图在我的语法NAS上安装带有docker和我自己的docker-compose.yml文件的gitlab

当我在我的语法(与终端)上运行这个文件时,退出代码1出现了一个错误:

运行/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-keys检查-返回的权限1

如何配置我的目录或停靠-撰写文件以更正此错误?

我已经在数据&日志和配置上执行了chmod -R 777chown -R root:root

代码语言:javascript
复制
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:in open‘from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:30:in initialize' from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_logger.rb:120:in new’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:in require_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

EN

回答 1

Stack Overflow用户

发布于 2019-02-11 17:34:04

我已经复制了您的设置,最后一次从码头日志(web_container_id)提供的输出是

代码语言:javascript
复制
=> /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:

代码语言:javascript
复制
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/gitlab
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54614682

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档