[英]setting up gitlab as docker container with docker registry showing error 500
I'm trying to running a Gitlab docker container in a Vagrant box. 我正在尝试在Vagrant框中运行Gitlab泊坞窗容器。 But I have some problems getting the docker registry running. 但是我在运行Docker注册表时遇到一些问题。
my docker-compose.yml
我docker-compose.yml
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
(port 23:22 is only because I start it in a vagrant box and the port is already used) (端口23:22仅仅是因为我在一个无用的盒子中启动它,并且该端口已被使用)
the gitlab itself is later available under the ip: 192.168.7.7
gitlab本身以后可以在IP下使用: 192.168.7.7
To activate the docker-registry I changed the /srv/gitlab/config/gitlab.rb
to the following: 要激活/srv/gitlab/config/gitlab.rb
-registry,我将/srv/gitlab/config/gitlab.rb
更改为以下内容:
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"
The container-registry is available after a new docker-compose up, but clicking on the button is sending me to the URL showing me a 500 error page 在完成新的docker-compose之后,即可使用container-registry,但是单击按钮会将我发送到显示500错误页面的URL
http://192.168.7.7/mygroup/myproject/container_registry http://192.168.7.7/mygroup/myproject/container_registry
and with this error log: 并带有以下错误日志:
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"
Anyone knows this problem? 有人知道这个问题吗?
The actual Registry is not included in Gitlab, it only serves as an authentication service. 实际的注册表未包含在Gitlab中,它仅用作身份验证服务。 You will need to setup a separate container for the registry: 您将需要为注册表设置一个单独的容器:
gitlab:
[...]
registry:
image: registry:2
[...]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.