Skip to content

Docker Registry page 500

Hello guys reporting a bug here..

I have confirmed this with a friend that also hosts gitlab. Gitlab Omnibus version: 8.8.4 running in docker a container

Reproducing the bug:

My machine spec: Fedora 23

Docker version

Client:
 Version:         1.9.1
 API version:     1.21
 Package version: docker-1.9.1-9.gitee06d03.fc23.x86_64
 Go version:      go1.5.3
 Git commit:      ee06d03/1.9.1
 Built:           
 OS/Arch:         linux/amd64

Server:
 Version:         1.9.1
 API version:     1.21
 Package version: docker-1.9.1-9.gitee06d03.fc23.x86_64
 Go version:      go1.5.3
 Git commit:      ee06d03/1.9.1
 Built:           
 OS/Arch:         linux/amd64
  • Create repo;
  • Allow Container Registry ;
  • From my machine login and push image (used alpine for testing because it is small, but seems to happen with any image);
  • In the repo page, click the Container Registry menu.

Here is the production log

==> /var/log/gitlab/gitlab-rails/production.log <==
Completed 500 Internal Server Error in 107ms (ActiveRecord: 5.4ms)

ActionView::Template::Error (undefined method `map' for nil:NilClass):
    3:     = escape_once(tag.name)
    4:     = clipboard_button(clipboard_text: "docker pull #{tag.path}")
    5:   %td
    6:     - if layer = tag.layers.first
    7:       %span.has-tooltip{ title: "#{layer.revision}" }
    8:         = layer.short_revision
    9:     - else
  lib/container_registry/tag.rb:60:in `layers'
  app/views/projects/container_registry/_tag.html.haml:6:in `_app_views_projects_container_registry__tag_html_haml___2883580725600157832_75400480'
  app/views/projects/container_registry/index.html.haml:40:in `block in _app_views_projects_container_registry_index_html_haml__1826250899900960963_72812260'
  app/views/projects/container_registry/index.html.haml:39:in `each'
  app/views/projects/container_registry/index.html.haml:39:in `_app_views_projects_container_registry_index_html_haml__1826250899900960963_72812260'
  lib/gitlab/middleware/go.rb:16:in `call'

Major problem with this is that I can't properly delete the images that I have uploaded.

If I upgrade docker to version 1.11.1, pull and push the images, the problem is fixe. However, If teamates with old version of docker push images, they break the Container Registry page of their repo. Here is the version I used to fix my gitlab page.

Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:55:58 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 18:55:58 2016
 OS/Arch:      linux/amd64