Building a private registry
Since the official Docker registry image does not run on the IBM Z platform, you can build one using a Docker file customized for Z. The following instructions describe how to build a private Docker registry image for zCX.
- Create a directory within your home directory on zCX. We recommend naming the directory
myregistry
. - Download the registry image Docker build file to the directory created in step 1. The build file is available at https://github.com/linux-on-ibm-z/dockerfile-examples/blob/master/DockerDistribution/Dockerfile.
- Run the build command:
When the build is complete you will see "Successfully tagged myregistry:latest".docker build -t myregistry .
- Run
and you should see the Docker image myregistry in the list of images.docker images
Run the following command to start your private registry server that listens to port
5000:
docker run --name myregistry-server -p 5000:5000 -d myregistry
You can
run the docker ps
command to check that the registry is up and running.You can find more details on running and restricting access to a secure private registry in the Docker registry resources: https://docs.docker.com/registry/