How do i save a docker image?
-
Also see: How do i load a previously save docker image?
Which image do you want to save? Let's save the alpine image.
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker latest 21df41782cc5 2 weeks ago 166MB alpine latest 3f53bb00af94 2 weeks ago 4.41MB
Save the alpine docker image.
$ docker save alpine > /tmp/alpine.tar
Do an normal tar listing to see what's in the archive.
$ tar tvf /tmp/alpine.tar -rw-r--r-- 0/0 1511 2018-12-21 00:21 3f53bb00af943dfdf815650be70c0fa7b426e56a66f5e3362b47a129d57d5991.json drwxr-xr-x 0/0 0 2018-12-21 00:21 a21b1050952cdc06771df49f52bd43b9adff41216b0ea39dbef0157cae64904b/ -rw-r--r-- 0/0 3 2018-12-21 00:21 a21b1050952cdc06771df49f52bd43b9adff41216b0ea39dbef0157cae64904b/VERSION -rw-r--r-- 0/0 1184 2018-12-21 00:21 a21b1050952cdc06771df49f52bd43b9adff41216b0ea39dbef0157cae64904b/json -rw-r--r-- 0/0 4672000 2018-12-21 00:21 a21b1050952cdc06771df49f52bd43b9adff41216b0ea39dbef0157cae64904b/layer.tar -rw-r--r-- 0/0 202 1970-01-01 01:00 manifest.json -rw-r--r-- 0/0 89 1970-01-01 01:00 repositories
© Lightnetics 2024