Running a local Docker registry

When you’re using Docker extensively, you sometimes need to run your own registry in order to push images around in your local network - or even on your local machine. For that you need a registry where you can push and pull images. With Docker itself, it’s easy to set it up. Here is a small docker-compose.yml which runs a registry and a simple frontend:

  image: registry:2
  - data:/var/lib/registry
  - 5000:5000
  image: konradkleine/docker-registry-frontend:v2
  - registry
  - 8080:80

The registry is persisting its data into the directory data, so nothing is lost if you throw away and recreate the container.

Save the file as docker-compose.yml and start it via docker-compose up in the same directory. After that you can open http://localhost:8080 and you see a basic frontend (taken from kwk/docker-registry-frontend).

Docker Registry with Frontend

Now when you push an image to your registry with the following command it becomes visible on the frontend:

docker pull alpine && docker tag alpine localhost:5000/alpine
docker push localhost:5000/alpine

Refresh the registry frontend and you’ll see the new image is available. You can now pull it with the following command:

docker pull localhost:5000/alpine

Have fun!

Weitere Artikel

Neue Tastatur: Pok3r Vortex RGB

New minecraft survival mod for 1.11.2

Änderungen beim Flug mit Quadkoptern

Ein paar Fotos

Nach den Crossfit Open

Crossfit Open WOD 17.5

Crossfit Open WOD 17.4

Crossfit Open WOD 17.3

Crossfit Open Workout 17.2

Crossfit Open Workout 17.1