Image Caching

    Minishift provides the image command together with its sub-commands to control the behavior of image caching. To export and import images from the Docker daemon of the Minishift VM, use minishift image export and minishift image import.

    Once the Minishift VM is running, images can be explicitly exported from the Docker daemon:

    1. Pulling image <image-name-0> .. OK
    2. Exporting <image-name-0>. OK
    3. Pulling image <image-name-1> .. OK
    4. Exporting <image-name-2>. OK

    To import previously cached images, use the minishift image import command:

    1. $ minishift image import <image-name-0> <image-name-1> ...
    2. Importing <image-name-0> . OK

    To view currently cached images on the host:

    To view images available in the Docker daemon:

    1. $ minishift image list --vm
    2. openshift/origin-haproxy-router:v3.6.0
    3. openshift/origin-pod:v3.6.0
    4. openshift/origin:v3.6.0

    In order to avoid having to type the image names explicitly as part of the image export or image import command, you can store a list of image names for import and export in the persistent configuration.

    Use to view the list of currently configured images and minishift image cache-config add to add images to the list:

    1. $ minishift image cache-config view
    2. $ minishift image cache-config add alpine:latest busybox:latest
    3. $ minishift image cache-config view
    4. alpine:latest
    5. busybox:latest

    To remove images from the list use :

    Once the image names are stored in the persistent configuration, you can run minishift image export and without any arguments.

    Image caching is enabled by default for Minishift. It occurs in a background process after the minishift start command is completed for the first time. Once the images are cached under $MINISHIFT_HOME/cache/images, successive Minishift VM creations will use these cached images.

    To disable this feature you need to disable the image-caching property in the persistent configuration using the command:

      You can re-enable the caching of the OpenShift images by setting image-caching to true or removing the setting altogether using minishift config unset:

      1. $ minishift config unset image-caching

      To delete an image from the local cache, use the command: