-
Notifications
You must be signed in to change notification settings - Fork 4
Distributing Images
Michael Sevilla edited this page Sep 5, 2016
·
5 revisions
You've made a Docker image from the Quickstart and now you want to share it with your cluster.
Dockerhub is public and adheres to the Popper Convention.
-
Tag your image:
docker tag mantle:latest michaelsevilla/mantle:jewel
-
Login to Dockerhub:
$ docker login ... Login Succeeded
-
Push your image:
docker push michaelsevilla/mantle:jewel
An in-house Docker image registry is faster than Dockerhub but it's much harder to Popperize.
-
Start up the registry:
docker run -d \ -p 5000:5000 \ --restart=always \ --name registry \ -v $PWD/data:/var/lib/registry \ registry:2
-
Tag the image:
docker tag mantle:latest $REGISTRY_IP:5000/michaelsevilla/mantle:jewel
-
Push your image to the registry:
docker push $REGISTRY_IP:5000/michaelsevilla/mantle:jewel
If you get an error:
$ docker push $REGISTRY_IP:5000/michaelsevilla/mds-reqlatency The push refers to a repository [192.168.140.2:5000/michaelsevilla/mds-reqlatency] Get https://192.168.140.2:5000/v1/_ping: tls: oversized record received with length 20527
You might have to instruct the daemon to use an insecure registry in
/etc/docker/daemon.json
:{ "insecure-registries": ["192.168.140.2:5000"] }
-
Check out your image sitting in the registry:
$ curl -X GET http://$REGISTRY_IP:5000/v2/_catalog | python -m json.tool { "repositories": [ "michaelsevilla/mantle" ] }
-
On all nodes, add this to the end of /etc/default/docker:
DOCKER_OPTS=--insecure-registry=$REGISTRY_IP:5000