Earlier quoted context omitted.
How do docker contexts help with the transfer of image between hosts?
I assume OP meant something like this, building the image on the remote host directly using a docker context (which is different from a build context) docker context create my-awesome-remote-context --docker "host=ssh://user@remote-host" docker --context my-awesome-remote-context build . -t my-image:latest This way you end up with `my-image:latest` on the remote host too. It has the advantage of not transferring the…
Show HN: Unregistry – “docker push” directly to servers without a registry
121–130 of 178 posts
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#122Functionality-wise this is a lot like docker-pushmi-pullyu[1] (which I wrote), except docker-pushmi-pullyu is a single relatively-simple shell script, and uses the official registry image[2] rather than a custom server implementation. @psviderski I'm curious why you implemented your own registry for this, was it just to keep the image as small as possible? [1]: https://github.com/mkantor/docker-pushmi-pullyu [2]: htt…
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#123this is nice, hopefully DHH and the folks working on Kamal adopt this. the whole reason I didn't end up using kamal was the 'need' a docker registry thing. when I can easily push a dockerfile / compose to my vps build an image there and restart to deploy via a make command
Build the image on the deployment server? Why not build somewhere else once and save time during deployments? I'm most familiar with on-prem deployments and quickly realised that it's much faster to build once, push to registry (eg github) and docker compose pull during deployments.
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#124My workflow in my homelab is to create a remote docker context like this...
(from my local development machine)
> docker context create mylinuxserver --docker "host=ssh://revicon@192.168.50.70"
Then I can do...
> docker context use mylinuxserver
> docker compose build
> docker compose up -d
And all the images contained in my docker-compose.yml file are built, deployed and running in my remote linux server.
No fuss, registry, no extra applications needed.
Way simpler than using docker swarm, Kubernetes or whatever. Maybe I'm missing something that @psviderski is doing that I don't get with my method.
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#125Is this different from using a remote docker context? My workflow in my homelab is to create a remote docker context like this... (from my local development machine) > docker context create mylinuxserver --docker "host=ssh://revicon@192.168.50.70" Then I can do... > docker context use mylinuxserver > docker compose build > docker compose up -d And all the images contained in my docker-compose.yml file are built, depl…
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#126This should have always been a thing! Brilliant. Docker registries have their place but are overall over-engineered and an antithesis to the hacker mentality.
I invested just 20 minutes to setup a .yaml workflow that builds and pushes an image to my private registry on ghcr.io, and 5 minutes to allow my server to pull images from it.
It's a very practical setup.
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#127Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#128I've been very happy doing this: DOCKER_HOST=“ssh://user@remotehost” docker-compose up -d It works with plain docker, too. Another user is getting at the same idea when they mention docker contexts, which is just a different way to set the variable. Did you know about this approach? In the snippet above, the image will be built on the remote machine and then run. The context (files) are sent over the wire as needed.…
This approach is akin to the prod server pulling an image from a registry. The op method is push based.
For 3rd party images like `postgres`, etc., then yes it will pull those from DockerHub or the registry you configure.
But in this method you push the source code, not a finished docker image, to the server.
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#129Is this different from using a remote docker context? My workflow in my homelab is to create a remote docker context like this... (from my local development machine) > docker context create mylinuxserver --docker "host=ssh://revicon@192.168.50.70" Then I can do... > docker context use mylinuxserver > docker compose build > docker compose up -d And all the images contained in my docker-compose.yml file are built, depl…
Assuming I understand your workflow, one difference is that unregistry works with already-built images. They aren't built on the remote host, just pushed there. This means you can be confident that the image on your server is exactly the same as the one you tested locally, and also will typically be much faster (assuming well-structured Dockerfiles with small layers, etc).
Re: Show HN: Unregistry – “docker push” directly to servers without a registry
#130Ooh this made me discover uncloud. Sounds like exactly what I was looking for. I wanted something like dokku but beefier for a sideproject server setup.
A recommendation for Portainer if you haven't used or considered it. I'm running two EC2 instances on AWS using portainer community edition and portainer agent and works really well. The stack feature (which is just docker compose) is also super nice. One EC2 instance; running Portainer agent runs Caddy in a container which acts as the load balancer and reverse proxy.