portainer: Container registry does not works with Gitlab

Bug description

Docker registry from gitlab.com cannot be accessed through a FQDN, hence cannot be accessed in Portainer.

Expected behavior Portainer functions properly with gitlab registry.

Briefly describe what you were expecting.

Steps to reproduce the issue:

Steps to reproduce the behavior:

  1. Open a brand new project
  2. Push an image to your registry (Step 1 and 2 done in https://gitlab.com/neil.cresswell/testproject)
  3. Start a brand new Portainer instance, done in here http://ip172-18-0-44-bdgg7mchlgn000888m7g-9000.direct.labs.play-with-docker.com , but it expires every 4 hrs.
  4. Register an Docker registry with registry.gitlab.com , and then try to pull the image, neil.cresswell/testproject:alpine , unable to pull it.
  5. Try registering another registry with registry.gitlab.com/neil.cresswell , pull image testproject:alpine , which allows you to successfully pull the image. However, after you create an container with it, when you try to edit/duplicate it, Portainer complains The Docker registry for the <image-url> image is not registered inside Portainer, hence you cannot do anything again

Technical details:

  • Portainer version: 1.19.1
  • Docker version (managed by Portainer): Standalone 18.03.1-ce
  • Platform (windows/linux): Linux for server
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer): Same one in getting started
  • Browser: Chrome

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 13
  • Comments: 34 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Based on my own testing…

  1. setting the registry URL as registry.gitlab.com, setting authentication, and pushing neil.cresswell/testimage:alpine succeeds

  2. setting the registry URL as registry.gitlab.com and pulling neil.cresswell/testimage:alpine fails

  3. setting the registry URL as registry.gitlab.com/neil.cresswell, setting authentication, and pushing testimage:alpine fails

  4. setting the registry URL as registry.gitlab.com/neil.cresswell and pulling testimage:alpine succeeds

  5. When trying to deploy a container within Portainer using registry.gitlab.com with image neil.cresswell/testimage:alpine, fails with a red toaster and the message “no image or no permission” (but can deploy anonymously from CLI just fine)

  6. When trying to deploy a container within Portainer using registry.gitlab.com/neil.cresswell with image name testimage:alpine fails with a red toaster and the message “b is null”.

So, at present, there is no way to use GitLab container registry from within Portainer.

Tried it out, still didn’t works image image

We haven’t used that second or third type of path for our images yet, but I just pushed a couple to test with and they seemed to pull fine from the Portainer Images UI. Just using the portion beyond the hostname like:

michaellee8/portainer-registry-bug-test:tag michaellee8/portainer-registry-bug-test/optional-image-name:tag michaellee8/portainer-registry-bug-test/optional-name/optional-image-name:tag

and the appropriate registry in the pulldown.

Again ours is a private GItLab CE server, but I would think it operates the same.

portainer 2018-08-07 11-13-08