RUN a local private registry
RUN the registry container with "registry image"
# docker container run -d --name registry -p 5000:5000 registry
Re-tag an existing image and push this image into your new registry
# docker image ls (to view images list)
# docker tag hello-world 127.0.0.1:5000/hello-world
# docker push 127.0.0.1:5000/hello-world
Remove images from local cache and pull it from new registry
# docker image rm hello-world
# docker image rm 127.0.0.1:5000/hello-world
# docker pull 127.0.0.1:5000/hello-world
Recreate registry using bind mount (to run below command you might need to remove registry container)
# docker container run -d --name registry -p 5000:5000 -v $(pwd)/registry-data:/var/lib/registry registry
# docker container run -d --name registry -p 5000:5000 registry
Re-tag an existing image and push this image into your new registry
# docker image ls (to view images list)
# docker tag hello-world 127.0.0.1:5000/hello-world
# docker push 127.0.0.1:5000/hello-world
Remove images from local cache and pull it from new registry
# docker image rm hello-world
# docker image rm 127.0.0.1:5000/hello-world
# docker pull 127.0.0.1:5000/hello-world
Recreate registry using bind mount (to run below command you might need to remove registry container)
# docker container run -d --name registry -p 5000:5000 -v $(pwd)/registry-data:/var/lib/registry registry
Comments
Post a Comment