Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not simple, you need to modify every Dockerfile and compose.yml to point to your cache instead of just using it directly.

Still doable though.



Docker Inc. pushed all this work on individuals by being shitty and not supporting adding the ability to add to / change the default registry search. Redhat has been patching Docker engine to let their users do it. It would be trivial if it could be an engine-wide setting ["mydockercache.me", "docker.io"] that would be transparent to everyone's Dockerfile.


There is, add this to your /etc/docker/daemon.json:

  {
    "registry-mirrors": [
      "https://pt-dh.int.xeserv.us"
    ]
  }
Where the URL points to your pull-through docker hub cache.


With podman and kube (crio and containerd) you can create mirror config such that the pulls happen from a mirror transparently. Some mirrors also support proxy cache behaviour so you dont in theory have to preload images (though might be necessary with the new limits)


None of this is simple. Fortunately, we're experts whose job it is to do this kind of work. People! You are not helpless!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: