Why local-to-remote push instead of remote-to-local pull? #33
-
Unregistry looks really useful and we're evaluating it for peer-to-peer image pushing. I'm trying to understand a Chesterton's Fence in unregistry's design. Why does We often push to devices over a LAN, with no internet, and getting the unregistry image on each remote host is an inconvenience. Here is a rough example of how a remote-to-local pull would work: # RUN LOCALLY
# Run unregistry
docker run -p 127.0.0.1:5000:5000 \
-v /run/containerd/containerd.sock:/run/containerd/containerd.sock \
--userns=host --user root:root \
ghcr.io/psviderski/unregistry:latest
# Pull some random image as a test
docker pull ubuntu:latest
docker tag ubuntu:latest myimage:latest
# Open reverse tunnel
ssh -R 5000:localhost:5000 vm-localhost # vm-localhost is an SSH config for a VM on my machine in a NAT
# RUN ON REMOTE
# Pull the image
docker pull localhost:5000/myimage:latest
EDIT: removed the intermediate step of pushing into the local registry first |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
docker-pushmi-pullyu took this approach, but without the convenience of centralizing around one image store like unregistry does. |
Beta Was this translation helpful? Give feedback.
We discussed this briefly in the comments on HN with the author of docker-pushmi-pullyu: https://news.ycombinator.com/item?id=44324834
In a nutshell, there is too much variability on the local system (macOS Docker/Rancher Desktop, Colima, Orbstack, Linux) compared to the remote one (typically Docker Engine on Linux) to be able to create a generic solution. If you know your use case and you don't need to cater for any other, there is nothing wrong about developing your own solution. It will likely be a much shorter script (you've already written 80% of it above) than our current
docker-pussh
one trying to handle all the possible edge cases.The other reason is I was keeping the uncloud use…