The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

5.3 Importing images into the local Docker Registry

Once you have set up a Docker registry server, you can import Docker images into the registry so that they can be used to deploy containers. You may either pull images from an upstream registry , such as the Oracle Container Registry, and then commit them to your local registry, or you may wish to create your own images based on upstream images.

To import upstream images into a local Docker registry:

  1. Pull an image from the upstream registry. For instance, you can pull an image from the Oracle Container Registry:

    # docker pull
  2. Tag the image so that it points to the local registry. For example:

    # docker tag localhost:5000/ol7image:v1 

    In this example, localhost is the hostname where the local registry is located and 5000 is the port number that the registry listens on. If you are working on a Docker engine located on a different host to the registry, you must change the hostname to point to the correct host. Note the repository and tag name, ol7image:v1 in the example, must all be in lower case to be a valid tag.

  3. Push the image to the local registry. For example:

    # docker push localhost:5000/ol7image:v1

See Section 4.3, “Creating a Docker Image from an Existing Container” and Section 4.4, “Creating a Docker Image from a Dockerfile” for information on how you can create your own images. Once you have committed a customized image, you can tag it and push it to your local registry as indicated in the steps above.