Stack deployments don't use the image registry

I have Portainer up and running, and using a local image registry.

I’d like to copy/paste docker compose files into Portainer to start up Docker Swarm stacks. Unfortunately, this fails because the referenced Docker images are not being pulled down from the registry into the local environment.

In order to make it work, i need to log into the host and pull the image from the registry on the command line (docker pull).

Is there a way to make it so Portainer automatically pulls down the image from the registry that’s set up in Portainer?

I know that from the command line, a “docker stack deploy” command requires the --with-registry-auth flag in order to properly pull from the registry, so I’m wondering if that’s what is missing somehow.

I know this is an old post but I am replying to give others insight who have this same issue. Yes there is actually: when I deploy a stack in Portainer I never have an issue with an image getting deployed. If it is a private image that is different story. You would have to add your private registry to Portainer like this:

Then you would deploy your stack with a compose file like this:

You would copy&paste your stack file (docker-compose.yml usually) Then at the bottom of that page you would click Deploy the stack.

There are ways to add .env variables and files to complete the stack if you needed to.

Let me know I will be glad to help.
Michael