ActionView::Template::Error (invalid date) when viewing container registry
I've built what's called a "microcontainer/image" using the smith
tool [1]. The result of building using smith
is an OCI image. Since it's not possible to directly import an OCI image into Docker, I uploaded that image to a local Docker registry using the smith
tool, which can convert to the Docker format when uploading using the -d
flag. I then pulled down the image from the local Docker registry and the image works perfectly fine.
But when I pushed it to my private GitLab Docker registry and trying to view the registry on GitLab I got a 500 response. In the log files I found this:
==> /var/log/gitlab/gitlab-rails/production.log <==
Completed 500 Internal Server Error in 381ms (ActiveRecord: 6.7ms)
ActionView::Template::Error (invalid date):
17: .light
18: \-
19: %td
20: - if tag.created_at
21: = time_ago_in_words(tag.created_at)
22: - else
23: .light
lib/container_registry/tag.rb:62:in `rfc3339'
lib/container_registry/tag.rb:62:in `created_at'
app/views/projects/registry/repositories/_tag.html.haml:20:in `_app_views_projects_registry_repositories__tag_html_haml__509239624357182291_69880875092500'
app/views/projects/registry/repositories/_image.html.haml:29:in `_app_views_projects_registry_repositories__image_html_haml__4568962612881620457_69880873718120'
app/views/projects/registry/repositories/index.html.haml:26:in `_app_views_projects_registry_repositories_index_html_haml___3439637651934767088_69880872950240'
app/controllers/application_controller.rb:281:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/etag_caching/middleware.rb:10:in `call'
lib/gitlab/request_context.rb:18:in `call'
If I run docker images
locally on my computer it shows that the microimage is created 292 years ago. So it seems that the date is not set correctly.
One can argue that the smith
tool should set the date correctly, but since it works both locally and on my local Docker registry I would think that it should work in GitLab as well.
I'm running GitLab 9.2.0 CE.