Ahmad
Ahmad

Reputation: 9658

How to retrive docker images of an older docker?

I had docker 18 when I pulled some docker images. Then I upgraded docker to docker 20, but it seems there are no images left (docker images) list nothing. Can I somehow retrieve them or I should pull them again?

Upvotes: 0

Views: 54

Answers (1)

Petronella
Petronella

Reputation: 2545

A Docker container consists of network settings, volumes, and images. The location of Docker files depends on your operating system. Here is an overview for the most used operating systems:

  • Linux: /var/lib/docker/
  • Windows: C:\ProgramData\DockerDesktop
  • MacOS: ~/Library/Containers/com.docker.docker/Data/vms/0/

If you use the default storage driver in overlay2, Linux, then your Docker images are stored in /var/lib/docker/overlay2. There, you can find different files that represent read-only layers of a Docker image and a layer on top of it that contains your changes.

If the update overwrote the folder .... you'll have to pull again.

Upvotes: 1

Related Questions