Building the registry image

Docker's registry server is an open source application. It's hosted on GitHub in the docker/distribution repository. To build the application, you need to install the Go SDK first. If you did that, you can run a simple command to compile the application:

go get github.com/docker/distribution/cmd/registry

But if you're not a regular Go developer, you don't want the overhead of installing and maintaining the Go tools on your local machine, just so you can build the registry server when you want to update it. It would be better to package the Go tools into a Docker image and set up the image so that when you run a container, it builds the registry server for you. You can do this with the same multi-stage build approach ...

Get Docker on Windows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.