Custom Registry Credentials expiring
I setup the github ghcr.io registry in dokploy, I was able to successfully deploy my changes 3days ago.
I just ran a manual deployment and I instantly am greeted with
is there some bug where it forgets the docker login?

39 Replies
I just added my old token again pressed save and it worked
Happend again
@Siumauricio would you be able to look into this when you have some time?
hmmm question did you update your dokploy server?
in between no
but the server restarted
imo the token should be presisted tho, I don't want to re-login each time the server restarts / I update
yeah that's what I'm thinking 🤔 I guess the auth config is not persisted
I will take a look on this
any luck looking into this>
I haven't had time to look this I will try to see today
@Flo Would you mind to open a issue in github?
Done
Just a question, what happen if you enter to the server and automatically login via the terminal?
they reset? or they persist the information?
Hm ill have to test that
Yeah, because I remember tried to mount the auth config, but it looks like is not possible, but I will research a little bit more about that
GitHub
GitHub - docker/docker-credential-helpers: Programs to keep Docker ...
Programs to keep Docker login credentials safe by storing in platform keystores - docker/docker-credential-helpers
I wonder if that can help
the normal docker login doesn't persist
have you tried to restart the server?
In this issue they say we could mount the folder https://github.com/containrrr/watchtower/discussions/596
GitHub
Mounting config.json and retaining any changes made by docker-login...
Describe the bug After updating from docker 18.09 to 19.03, watchtower can no longer see read updated token to in config.json on the host. This has been working, and is working, fine on servers tha...
dokploy has to persist the token tho no?
or do I need to set
for each compose that uses githubs registry
It would be great if that could be handled by dokploy instead and I just setup the registry and call it a day 😅
the DOCKER_CONFIG env is automatically added https://github.com/Dokploy/dokploy/blob/canary/apps/dokploy/server/utils/builders/compose.ts#L108
GitHub
dokploy/apps/dokploy/server/utils/builders/compose.ts at canary · D...
Open Source Alternative to Vercel, Netlify and Heroku. - Dokploy/dokploy
but the volume is not mounted, maybe I can try to mount to the dokploy container
so the auth config is persist
yeah that would be awesome
are you using Applications or docker compose?
I think I found the solution, would you mind to test it?
Yup
Compose
Did you run the commands I share above ?
I tested and it was working!
alright, when im home from work I will try this thanks!
how can I test it afterwards just restarting dokploy
Yeah only restart dokploy
hmm I just updated to 0.7.2 and I got the same error message :/

saved the token again, which is also empty in the registry modal
and it worked
maybe the issue is that it doesn't save in here?

did you run the steps i shared above?
because the only way to lose the credentials is because you didn't created the volume
are they not enabled by default in the new sversion?
nop, you need to recreate the container in order to assign the new volume
do you have me the command to create the volume again I dont see it in the chat anymore
lol, let me check
😅
sorry
Run this:
1. docker service rm dokploy
2. Run this
Will i need to re-run this on each update or only this itme
no, only 1 time
worked for me
only thing that confuses me is that I already had a config.json file in there updating the registry in dokploy didn't seem to write to it
Last changed date is still when I manually ran it.
I will test it tomorrow again when I remove that file
Basically what we did is that the directory /root/.docker that is created internally contains the credentials that you add and if the container dies the credentials will be there.
ah ok so it won't be presisted to the local volume
that makes sense then
im happy since it seems to work, thank you!