Live data from Hacker News

Show HN: Unregistry – “docker push” directly to servers without a registry

github.com

91–100 of 178 posts

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#91
post #21

Earlier quoted context omitted.

The right yq|xargs invocation on your compose file should get you to a oneshot.

I would prefer docker compose pussh or whatever

You can wrap docker in a bash function that passes through to `command docker` when it's not a compose pussh command.

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#92

Earlier quoted context omitted.

On podman this is built in as native command podman-image-scp[0], which perhaps could be more efficient with SSH compression. [0] https://docs.podman.io/en/stable/markdown/podman-image-scp.1...

So with Podman, this exists already, but for docker, this has to be created by the community. I am a bystander to these technologies. I’ve built and debug’ed the rare image, and I use docker desktop on my Mac to isolate db images. When I see things like these, I’m always curious why docker, which seems so much more beaurecratic/convoluted, prevails over podman. I totally admit this is a naive impression.

Something that took me 20 years to learn: Never underestimate the value of a slick gui.

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#93
This is timely for me!

I personally run a small instance with Hetzner that has K3s running. I'm quite familiar with K8s from my day job so it is nice when I want to do a personal project to be able to just use similar tools.

I have a Macbook and, for some reason I really dislike the idea of running docker (or podman, etc) on it. Now of course I could have GitHub actions building the project and pushing it to a registry, then pull that to the server, but it's another step between code and server that I wanted to avoid.

Fortunately, it's trivial to sync the code to a pod over kubectl, and have podman build it there - but the registry (the step from pod to cluster) was the missing step, and it infuriated me that even with save/load, so much was going to be duplicated, on the same effective VM. I'll need to give this a try, and it's inspired me to create some dev automation and share it.

Of course, this is all overkill for hobby apps, but it's a hobby and I can do it the way I like, and it's nice to see others also coming up with interesting approaches.

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#94

Considering the nature of servers, security boundaries and hardening, > Linux via Homebrew Please don't encourage this on Linux. It happens to offer a Linux setup as an afterthought but behaves like a pigeon on a chessboard rather than a package manager.

Well put, but it's a shame this comment is the first thing I read, rather than comments about the tool itself!

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#95
post #14
post #12

How about using docker context. I use that a lot and works nicely.

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 entire image but only transferring the build context. It builds the actual image on the remote host.

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#97

Considering the nature of servers, security boundaries and hardening, > Linux via Homebrew Please don't encourage this on Linux. It happens to offer a Linux setup as an afterthought but behaves like a pigeon on a chessboard rather than a package manager.

Brew is such a cute little package manager. Updating its repo every time you install something. Randomly self updating like a virus.

That made me laugh lol

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#98

Considering the nature of servers, security boundaries and hardening, > Linux via Homebrew Please don't encourage this on Linux. It happens to offer a Linux setup as an afterthought but behaves like a pigeon on a chessboard rather than a package manager.

We're using it to distribute internal tools across macOS and Linux developers. It excels in this.

Are there any good alternatives?

Re: Show HN: Unregistry – “docker push” directly to servers without a registry

#100
I'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. Subsequent runs will use the remote machine's docker cache. It's slightly different than your approach of building locally, but much simpler.

Post reply on HN