What is the location of the docker image files on OS/X?

There are several questions regarding how to view docker images on local machine including I can't find my Docker image after building it

The docker images command does report that an image was successfully created:

  • How to disable Docker container to restart for `gcloud preview app run`
  • Firefox hangs after opening Karma Server URL in Docker
  • Docker: “lstat no such file or directory” error when building image. File is there
  • Arch Linux, Docker “No space left on device.”
  • Octohost with knife solo on bare metal? (UserError: Vagrant not installed)
  • IBM Container deployment failure
  • $docker images
    REPOSITORY                                              TAG                 IMAGE ID            CREATED             SIZE
    caffeonspark                                            cpu                 bd347271dc01        28 minutes ago      5.28 GB

    This question is about the physical locations of the docker files – to do operations like copying/backups etc. How would the paths be found on OS/X?

  • Cannot Install R Packages in Docker Image
  • Openshift Origin run-app against insecure registry yields stuck pod with “Error while pulling image”
  • What's the differences between layer and image in docker?
  • How do we set the the RAM and disk space for a docker container?
  • How to create read-only user in the Docker Registry v2?
  • How to use Docker in Windows ?
  • One Solution collect form web for “What is the location of the docker image files on OS/X?”

    On Mac, Docker images are stored within the VM. See this Question.

    On Linux, Docker images are stored in /var/lib/docker, so backing up that directory should be sufficient.

    I don’t think you should be copying images from that directory. The normal way to share a built image between machines is with Docker Hub or with a private Docker registry. If you want to share images that are not published to a registry, you can simply share the Dockerfile.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.