• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Portainer Stack fails to pull from private Registry
Hallo everyone,

until now, we always used the "container"-Tab of Portainer to create containers from images, located on our own private registry. We never had problems pulling these images automatically while container-creation. At the moment we are trying to use the Portainer "Stack" feature to automate container creation, which is a way of using docker-compose via portainer.

Everything works fine, as long as we use images from docker-hub. If we try to pull images from our own private registry via stack, the attached error message gets displayed. If we pull these images beforehands via the "image"-Tab, the stack starts up well. We testet the same on a raspberry-pi with a newer portainer-version (2.11.0) without any problems.

Does anyone know a way to fix this problem? I also attached the example docker-compose-file to reproduce the problem.



Attached Files Thumbnail(s)
What happens if you pull from your private registry without using the swarm option ... I mean manually using the "images" menu with "pull image" option?

Have you defined your registry in the "Registries" menu in portainer?

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

I found the following article https://www.baeldung.com/linux/docker-co...positories. The conclusion of this article is that using docker-compose as done with "stacks" in portainer needs to login to the private registry first using the "docker login" command ... but this command I think isn't called by portainer before docker-compose is called during stacks execution. This is an assumption only. I have never verified it.

I read the latest portainer documentation ... https://docs.portainer.io/v/ce-2.11/user...stacks/add ... I cannot recognize any hint on that page that a newer version of portainer would solve this problem. Can't see any login credentials either on this page.

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

Hey Armin,

thanks for your quick reply.

Pulling the image from the "Images"-Tab works just fine. I defined the Registry at the Registries-Tab as always like this:


As I said, doing the same steps on a raspberry-pi with docker and portainer in the current version (2.11.0) works like a charm. To be sure, that any previouse "docker login ..." done on the raspberry-pi does not interact, I've just redone the test with a "docker logout ..." done before. I was still able to set up a stack in Portainer without having the images locally available and pulling them from the private registry during the stacks "deployment".

I have found a bug report, which implies that it should work and works from Version 2.1.0 onwards:


With this fix:



Possibly Related Threads…
Thread Author Replies Views Last Post
  netPI opc ua server pull image error wswitula 3 968 August-27th-2021, 10:47 AM
Last Post: wswitula
  Portainer password reset r.nilles 1 990 January-25th-2021, 11:12 AM
Last Post: Armin@netPI
  create container in Portainer v1.12.4 dcatteeu 2 1,431 September-9th-2019, 12:12 PM
Last Post: dcatteeu
  [SOLVED] Pull Docker Image a.w.d.m. 8 2,429 July-8th-2019, 11:17 AM
Last Post: Armin@netPI
  Setup trusted Docker registry on a Raspberry Pi to host netPI containers Armin@netPI 12 6,745 January-31st-2019, 06:47 PM
Last Post: Armin@netPI
  [SOLVED] Portainer.IO. cannot log in JZijlstra 2 1,723 January-10th-2019, 06:04 PM
Last Post: JZijlstra
  [SOLVED] External Portainer Control Flo_Lo 1 1,484 October-18th-2018, 01:49 PM
Last Post: Armin@netPI
  [SOLVED] Portainer does not start container Steres 3 3,536 October-16th-2018, 06:54 PM
Last Post: Armin@netPI
  [SOLVED] Private Registry with self signed certifcate and basic auth Jonas.Sellmann@outlook.de 3 1,463 October-9th-2018, 11:18 AM
Last Post: Armin@netPI
  [SOLVED] Authenticate against Docker Registry PBulach 19 5,560 September-19th-2018, 12:31 PM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 2 Guest(s)