Distributing Images

Michael Sevilla edited this page Sep 5, 2016 · 5 revisions

Distributing Images

You've made a Docker image from the Quickstart and now you want to share it with your cluster.

Using Dockerhub

Dockerhub is public and adheres to the Popper Convention.

  1. Tag your image:

    docker tag mantle:latest michaelsevilla/mantle:jewel
  2. Login to Dockerhub:

    $ docker login
    Login Succeeded
  3. Push your image:

    docker push michaelsevilla/mantle:jewel

Using an Internal Registry

An in-house Docker image registry is faster than Dockerhub but it's much harder to Popperize.

  1. Start up the registry:

    docker run -d \
      -p 5000:5000 \
      --restart=always \
      --name registry \
      -v $PWD/data:/var/lib/registry \
  2. Tag the image:

    docker tag mantle:latest $REGISTRY_IP:5000/michaelsevilla/mantle:jewel
  3. 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 []
    Get 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": [""]
  4. Check out your image sitting in the registry:

    $ curl -X GET http://$REGISTRY_IP:5000/v2/_catalog | python -m json.tool
        "repositories": [
  5. On all nodes, add this to the end of /etc/default/docker:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.