5.2.15

Docker registries

Setting a docker registry isn't too hard.
systemctl start docker-registry
But wait!  This registry isn't pointing to your docker images which your  docker client daemon uses (those images are in this directory):
/var/lib/docker/graph
Instead, the docker-registry stores images here.
/var/lib/docker-registry/images
So, make sure you push an image to your registry before trying to use it.
docker push localhost:5000/busybox
I recently got an "Invalid registry" error when accessing a docker-registry from a remote machine.


There are a few workarounds to this.  The easiest, is simply to allow your docker clients to pull from an insecure-registry.  To do this, you edit /etc/sysconfig/docker like this.
OPTIONS=--selinux-enabled --insecure-registry myhost.mycompany.com:5000
Now, restart docker.
systemctl start docker
Now, restart docker.  You should now be able to pull down images remotely.
docker pull myhost.mycompany.com:5000/busybox



No comments:

Post a Comment