Re:Show HN: A CLI tool I made to self-host any app with two ...
by aag on Thursday September 19, 2024 @01:37PM
(#41594282)
This could be great for my projects, but I'm confused about one thing: why does it need to push to a Docker registry? The Dockerfile is local, and each image is built locally. Can't the images be stored purely locally? Perhaps I'm missing something obvious. Not using a registry would reduce the number of moving parts.
[ Parent
| on HN ]
Re:Show HN: A CLI tool I made to self-host any app with two ...
by 3np on Thursday September 19, 2024 @03:47PM
(#41595643)
You can easily set up a Docker/CNCF registry[0] container running locally. It can be run either as a caching pull-through mirror for a public registry (allowing you to easily run public containers in an environment without internet access) or as a private registry for your own image (this use-case). So if you want both features, you currently need two instances. Securing it for public use is a bit less trivial but for local use it's literally a 'run' or two.
So you can do 'docker build -t localhost/whatever' and then 'docker run localhost/whatever'. Also worth checking out podman to more easily run everything rootless.
If all you need is to move images between hosts like you would files, you don't even need a registry (docker save/load).
Re:Show HN: A CLI tool I made to self-host any app with two ...
by mightymoud on Thursday September 19, 2024 @02:01PM
(#41594513)
Locally here means the locally on your laptop locally, not locally on your VPS. Contrary to popular opinion, I believe your source code shouldn't be on your prod machine - a docker image is all you need. Lots of other projects push your code to VPS to build the image there then use it. I see no point in doing that...