Open hundredwatt opened 1 month ago
Your workaround using accessories is brilliant! π€―
I like your idea to simply skip the login with a flag. Would it also suit your needs to have first-class support for deploying a public image? Maybe it's possible today, but I haven't found that feature yet. π€·ββοΈ
If we could do that I could get rid of my Dockerfile
and the bootstrap-with-ngrok hack in my example here: https://gist.github.com/pingortle/040098454af630cc6cf6fa78bed9b018
For context, here are a few related discussions. Just wanted to link them here for discoverability.
Would it also suit your needs to have first-class support for deploying a public image? Maybe it's possible today, but I haven't found that feature yet. π€·ββοΈ
It's not possible today unless you can add LABEL service <serice_name>
to the public image (or rebuild it yourself with the LABEL) or use my accessory approach, but the latter only supports a single instance.
I assume long term there will be a solution to run the Docker registry on your own server natively via kamal.
Until then, I worked out a short-term solution using an accessory and
kamal-proxy
trickery: https://nochlin.com/blog/host-your-own-docker-registry-with-kamal-2The short-term solution still requires credentials for another registry during the setup process (or this can be hacked by setting
registry.server
togithub.com
π ).To make the short-term solution easier, would you consider skipping
docker login
when booting the proxy and accessories?KAMAL.registry.login
from proxy commands since none of the commands depend on it: https://github.com/basecamp/kamal/blob/main/lib/kamal/cli/proxy.rb#L12--skip-login
flag or something: https://github.com/basecamp/kamal/blob/main/lib/kamal/cli/accessory.rb#L280(I'm happy to work on the above if the maintainers agree this is a good idea)