dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Faliure of docker authentication across managed servers

Open DenoGeek opened this issue 4 weeks ago • 3 comments

To Reproduce

I have this issue with dokploy when using GHCR. I have added the registry and would like to use it across all remote serves where i deploy services.

This however only works in the node that i test the registry in. All the other nodes throw an docker authentication failed.

The workaround right now is to select the other nodes and click test server so that credentials are also created under ~/.docker/config.json in the remote server node.

Current vs. Expected behavior

The expectation is during deployment, dokploy ensures that the credentials to the selected registry in the service has been written in the destination node.

Provide environment information

OS: Ubuntu > 20
Dokploy version v0.25.10

Which area(s) are affected? (Select all that apply)

Docker Compose

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

No response

Will you send a PR to fix it?

Maybe, need help

DenoGeek avatar Nov 26 '25 07:11 DenoGeek

you need to add --with-registry-auth

djsisson avatar Nov 26 '25 09:11 djsisson

you need to add --with-registry-auth

where?

vgallegob avatar Nov 27 '25 12:11 vgallegob

I think the issues is that the registry credentials are not propagated to all nodes simultaneously.

DenoGeek avatar Nov 28 '25 21:11 DenoGeek

I think the issues is that the registry credentials are not propagated to all nodes simultaneously.

are you using docker compose (stack)?

Siumauricio avatar Dec 03 '25 00:12 Siumauricio

@Siumauricio i have the same issue. we are using the remote servers for payload and do not use the dokploy host for serving services. We need to test the remote servers until the registry becomes authenticated. Additionally it should be ensured, that the token validity will not time out

mtb77 avatar Dec 10 '25 08:12 mtb77

I have the exact same issue using Github package repository.

My worker nodes does not have the credentials to log in (or doesn't pull the image), unless I run docker service update --with-registry-auth --force myservicename.

I am running Dokploy with a master node and one worker node. I have created an application and specified a docker image from my org private repo. Dokploy tries to deploy the app on the worker node, but fails with "no such image". Dokploy then proceeds with deploying on the master node, which work fine.

To get the application on the worker node, I need to scale to 0, run docker service update --with-registry-auth --force myservicename and scale back to 1.

docker service scale myservicename=0
docker service update --with-registry-auth --force myservicename
docker service scale myservicename=1

I have to run that every time I deploy a new service, and even if I change the tag name of the docker image

KjetilW avatar Dec 10 '25 12:12 KjetilW

you should be able to just run docker service update --image registry/image:tag --with-registry-auth service swarm checks the digest and updates the service if its changed even using same tag, no need to downscale, since that defeats the main purpose of using swarm in the first place (rolling updates)

djsisson avatar Dec 10 '25 20:12 djsisson

I imagine the correct fix for this issue would be to always use --with-registry-auth when docker service create or docker service update

KjetilW avatar Dec 11 '25 10:12 KjetilW