首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将gitlab设置为带有显示错误500的码头注册表的码头容器

将gitlab设置为带有显示错误500的码头注册表的码头容器
EN

Stack Overflow用户
提问于 2016-06-20 14:35:00
回答 1查看 2.1K关注 0票数 0

我正试着在一个真空箱里运行一个Gitlab码头集装箱。但我在码头注册表的运行上遇到了一些问题。

我的docker-compose.yml

代码语言:javascript
复制
gitlab:
  container_name: gitlab
  image: gitlab/gitlab-ce:latest
  volumes:
  - /srv/gitlab/config:/etc/gitlab
  - /srv/gitlab/logs:/var/log/gitlab 
  - /srv/gitlab/data:/var/opt/gitlab
  - /srv/gitlab/logs/reconfigure:/var/log/gitlab/reconfigure
  restart: always
  hostname: 192.168.7.7
  ports:
    - 0.0.0.0:23:22
    - 0.0.0.0:80:80
    - 0.0.0.0:443:443
    - 0.0.0.0:5000:5000
    - 0.0.0.0:7443:7443

(端口23:22只是因为我在一个流浪者箱中启动它,并且端口已经被使用了)

gitlab本身稍后可以在ip:192.168.7.7下使用。

要激活停靠注册中心,我将/srv/gitlab/config/gitlab.rb更改为:

代码语言:javascript
复制
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "192.168.7.7"
gitlab_rails['registry_port'] = "7443"
gitlab_rails['registry_api_url'] = "http://192.168.7.7:5000"

容器注册表在一个新的停靠程序完成后可用,但是单击按钮会将我发送到URL,显示一个500错误页面。

registry

对于这个错误日志:

代码语言:javascript
复制
gitlab    | 
gitlab    | ==> /var/log/gitlab/gitlab-rails/production.log <==
gitlab    | Started GET "/mygroup/myproject/container_registry" for 127.0.0.1 at 2016-06-20 14:29:06 +0000
gitlab    | Processing by Projects::ContainerRegistryController#index as HTML
gitlab    |   Parameters: {"namespace_id"=>"plattform", "project_id"=>"node-sample"}
gitlab    | Completed 500 Internal Server Error in 858ms (ActiveRecord: 29.6ms)
gitlab    | 
gitlab    | Faraday::ConnectionFailed (Connection reset by peer):
gitlab    |   lib/container_registry/client.rb:18:in `repository_tags'
gitlab    |   lib/container_registry/repository.rb:22:in `manifest'
gitlab    |   lib/container_registry/repository.rb:31:in `tags'
gitlab    |   app/controllers/projects/container_registry_controller.rb:8:in `index'
gitlab    |   lib/gitlab/middleware/go.rb:16:in `call'
gitlab    | 
gitlab    | 
gitlab    | 
gitlab    | ==> /var/log/gitlab/gitlab-workhorse/current <==
gitlab    | 2016-06-20_14:29:07.96418 2016/06/20 14:29:07 ErrorPage: serving predefined error page: 500
gitlab    | 
gitlab    | ==> /var/log/gitlab/nginx/gitlab_access.log <==
gitlab    | 192.168.7.1 - - [20/Jun/2016:14:29:07 +0000] "GET /mygroup/myproject/container_registry HTTP/1.1" 500 2205 "http://192.168.7.7/mygroup/myproject" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"
gitlab    | 
gitlab    | ==> /var/log/gitlab/gitlab-workhorse/current <==
gitlab    | 2016-06-20_14:29:07.96500 192.168.7.7 @ - - [2016-06-20 14:29:06.832069994 +0000 UTC] "GET /mygroup/myproject/container_registry HTTP/1.1" 500 2205 "http://192.168.7.7/mygroup/myproject" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0" 1.132525
gitlab    | 
gitlab    | ==> /var/log/gitlab/gitlab-rails/production.log <==
gitlab    | Started GET "/mygroup/myproject/container_registry" for 127.0.0.1 at 2016-06-20 14:29:07 +0000
gitlab    | Processing by Projects::ContainerRegistryController#index as HTML
gitlab    |   Parameters: {"namespace_id"=>"plattform", "project_id"=>"node-sample"}
gitlab    | Completed 500 Internal Server Error in 98ms (ActiveRecord: 10.6ms)
gitlab    | 
gitlab    | Faraday::ConnectionFailed (Connection reset by peer):
gitlab    |   lib/container_registry/client.rb:18:in `repository_tags'
gitlab    |   lib/container_registry/repository.rb:22:in `manifest'
gitlab    |   lib/container_registry/repository.rb:31:in `tags'
gitlab    |   app/controllers/projects/container_registry_controller.rb:8:in `index'
gitlab    |   lib/gitlab/middleware/go.rb:16:in `call'
gitlab    | 
gitlab    | 
gitlab    | 
gitlab    | ==> /var/log/gitlab/gitlab-workhorse/current <==
gitlab    | 2016-06-20_14:29:08.13700 2016/06/20 14:29:08 ErrorPage: serving predefined error page: 500
gitlab    | 2016-06-20_14:29:08.13719 192.168.7.7 @ - - [2016-06-20 14:29:07.985360314 +0000 UTC] "GET /mygroup/myproject/container_registry HTTP/1.1" 500 2205 "http://192.168.7.7/mygroup/myproject" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0" 0.151699
gitlab    | 
gitlab    | ==> /var/log/gitlab/nginx/gitlab_access.log <==
gitlab    | 192.168.7.1 - - [20/Jun/2016:14:29:08 +0000] "GET /mygroup/myproject/container_registry HTTP/1.1" 500 2205 "http://192.168.7.7/mygroup/myproject" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"

有人知道这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-21 05:26:07

实际的注册表不包括在Gitlab中,它只用作身份验证服务。您需要为注册表设置一个单独的容器:

代码语言:javascript
复制
gitlab:
  [...]

registry:
  image: registry:2
  [...]
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37925220

复制
相关文章

相似问题

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