For this we will use the docker run command with the docker registry- https://hub.docker.com/_/registry image.
# Run the registry containerdockerrun\-d\-p5000:5000\--restartalways\--nameregistry\registry:latest
02. Prepare the local images
We will download the images from DockerHub and push them to the local registry.
02.01. Download busybox image
# download busybox image from docker-hubdockerpullbusybox
02.01. Tag the image with the local registry prefix
# Tag the busybox image with the local registry prefixdockertagbusyboxlocalhost:5000/busybox
02.02. Push the image to the local registry
# Once we have the appropriate tag, we can push the image to the local registrydockerpushlocalhost:5000/busybox
03. Test local images
# List all local repositoriescurl-XGEThttp://localhost:5000/v2/_catalog
# List all tags for a repositorycurl-XGEThttps://myregistry:5000/v2/ubuntu/tags/list