4.7. Copying image layers to a local directory
You can use the skopeo copy command to copy the layers of a container image to a local directory.
Prerequisites
-
The
container-toolsmeta-package is installed.
Procedure
Create the
/var/lib/images/nginxdirectory:$ mkdir -p /var/lib/images/nginxCopy the layers of the
docker://docker.io/nginx:latest imageto the newly created directory:$ skopeo copy docker://docker.io/nginx:latest dir:/var/lib/images/nginx
Verification
Display the content of the
/var/lib/images/nginxdirectory:$ ls /var/lib/images/nginx 08b11a3d692c1a2e15ae840f2c15c18308dcb079aa5320e15d46b62015c0f6f3 ... 4fcb23e29ba19bf305d0d4b35412625fea51e82292ec7312f9be724cb6e31ffd manifest.json versionRefer to
skopeo-copy(1)man page on your system for more information.