kamal icon indicating copy to clipboard operation
kamal copied to clipboard

Suggestion: Deploy a docker repository on the server for direct pushes.

Open timuckun opened this issue 2 years ago • 10 comments

Some people may want to avoid using third party repositories. It's pretty easy to spin up a repository using docker itself so one idea would be that mrsk would start a repository on the server during deploy, push the container to the repo, then stop the repo.

It could optionally also delete older images based on some strategy (count or age or whatnot).

Just an idea.

timuckun avatar Mar 03 '23 03:03 timuckun

Feel free to explore it! Like the sound of it.

dhh avatar Mar 03 '23 13:03 dhh

(Can do docker save image:tag | gzip | ssh user@host docker load to schlep an image without a registry. Pretty heavy though; no layers.)

jeremy avatar Mar 23 '23 08:03 jeremy

yea but it doesn't seem too difficult to launch a registry using docker itself https://docs.docker.com/registry/deploying/

This way you can keep the layers.

You can launch the server, do a push, and then shut down the server right away.

timuckun avatar Mar 23 '23 08:03 timuckun

Any updates on this? I think the "registry on the server" option sounds reasonable. The image size is quite small also.

brapifra avatar Apr 27 '23 15:04 brapifra

Feel free to investigate 👍. If something simple could be concocted, I could see it being part of MRSK directly. But please do investigate.

dhh avatar Apr 28 '23 08:04 dhh

Maybe it can be installed as a MRSK accessory and used locally to store the images in the same server.

PabloC avatar May 09 '23 20:05 PabloC

I'd really like this as an option. The "where will we store the images/containers and how much will it cost us" question is hard to answer to those that pay the bills.

dotnofoolin avatar Mar 05 '24 22:03 dotnofoolin

Please do investigate. I think it's going to be rather complicated to have good caching layer dynamics without running a whole docker image repository on the server, and that has a whole rabbit hole of complexity too.

dhh avatar Mar 05 '24 23:03 dhh

What if we just built the images on the server directly and bypassed a container registry all together? Similar to the builder configuration options? I fully understand this negates the benefits of building one container and deploying it multiple places, and would make the overall deploy slower.

dotnofoolin avatar Mar 06 '24 17:03 dotnofoolin