Faliure of docker authentication across managed servers
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
you need to add --with-registry-auth
you need to add --with-registry-auth
where?
I think the issues is that the registry credentials are not propagated to all nodes simultaneously.
I think the issues is that the registry credentials are not propagated to all nodes simultaneously.
are you using docker compose (stack)?
@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
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
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)
I imagine the correct fix for this issue would be to always use --with-registry-auth when docker service create or docker service update