Commandes Linux : docker image save

DOCKER IMAGE SAVE

Commande : docker image save
Usage:	docker image save [OPTIONS] IMAGE [IMAGE...]

Save one or more images to a tar archive (streamed to STDOUT by default)

Options:
  -o, --output string   Write to a file, instead of STDOUT

 

Sauvegarder une image existante dans une archive tar :

docker image save image[:tag] -o archive.tar

ou

docker image save image[:tag] > archive.tar

Equivaut à :
docker save image[:tag] -o archive.tar
ou
docker save image[:tag] > archive.tar
ex :

$ docker image save pong:2.0 -o pong-2.0.tar
$ tar tvf pong-2.0.tar
drwxr-xr-x 0/0               0 2018-10-16 13:22 7d689be2a587c46ff75fe9c0d4058f861444b938460f9f0729fec42dfcdffcd9/
-rw-r--r-- 0/0               3 2018-10-16 13:22 7d689be2a587c46ff75fe9c0d4058f861444b938460f9f0729fec42dfcdffcd9/VERSION
-rw-r--r-- 0/0            1410 2018-10-16 13:22 7d689be2a587c46ff75fe9c0d4058f861444b938460f9f0729fec42dfcdffcd9/json
-rw-r--r-- 0/0            4608 2018-10-16 13:22 7d689be2a587c46ff75fe9c0d4058f861444b938460f9f0729fec42dfcdffcd9/layer.tar
drwxr-xr-x 0/0               0 2018-10-16 13:22 8d153eee9afdd125f452c3e8ea10560a2653a228bc0a7ca4ec856217a50bd5f1/
-rw-r--r-- 0/0               3 2018-10-16 13:22 8d153eee9afdd125f452c3e8ea10560a2653a228bc0a7ca4ec856217a50bd5f1/VERSION
-rw-r--r-- 0/0             482 2018-10-16 13:22 8d153eee9afdd125f452c3e8ea10560a2653a228bc0a7ca4ec856217a50bd5f1/json
-rw-r--r-- 0/0        46928896 2018-10-16 13:22 8d153eee9afdd125f452c3e8ea10560a2653a228bc0a7ca4ec856217a50bd5f1/layer.tar
drwxr-xr-x 0/0               0 2018-10-16 13:22 9855d8e74b5b72748d7841326b8d9741e74523ed46e9ab9a0a8114ffdd579530/
-rw-r--r-- 0/0               3 2018-10-16 13:22 9855d8e74b5b72748d7841326b8d9741e74523ed46e9ab9a0a8114ffdd579530/VERSION
-rw-r--r-- 0/0             482 2018-10-16 13:22 9855d8e74b5b72748d7841326b8d9741e74523ed46e9ab9a0a8114ffdd579530/json
-rw-r--r-- 0/0            2560 2018-10-16 13:22 9855d8e74b5b72748d7841326b8d9741e74523ed46e9ab9a0a8114ffdd579530/layer.tar
drwxr-xr-x 0/0               0 2018-10-16 13:22 cda0fc2f1fa4a75c7ee707f4be247f082923a17ca85dd70f514772079a644f53/
-rw-r--r-- 0/0               3 2018-10-16 13:22 cda0fc2f1fa4a75c7ee707f4be247f082923a17ca85dd70f514772079a644f53/VERSION
-rw-r--r-- 0/0             482 2018-10-16 13:22 cda0fc2f1fa4a75c7ee707f4be247f082923a17ca85dd70f514772079a644f53/json
-rw-r--r-- 0/0         5345792 2018-10-16 13:22 cda0fc2f1fa4a75c7ee707f4be247f082923a17ca85dd70f514772079a644f53/layer.tar
-rw-r--r-- 0/0            4329 2018-10-16 13:22 f501db54c90de1e4cdb9c82f32069fd982f2a8e4f019910371b5a7fc085376ad.json
drwxr-xr-x 0/0               0 2018-10-16 13:22 f89d14af1325a2529c3bb2c704b62f2f2d93a9fb6bb0286ce9defcf5d65028e6/
-rw-r--r-- 0/0               3 2018-10-16 13:22 f89d14af1325a2529c3bb2c704b62f2f2d93a9fb6bb0286ce9defcf5d65028e6/VERSION
-rw-r--r-- 0/0             406 2018-10-16 13:22 f89d14af1325a2529c3bb2c704b62f2f2d93a9fb6bb0286ce9defcf5d65028e6/json
-rw-r--r-- 0/0         5053952 2018-10-16 13:22 f89d14af1325a2529c3bb2c704b62f2f2d93a9fb6bb0286ce9defcf5d65028e6/layer.tar
-rw-r--r-- 0/0             505 1970-01-01 01:00 manifest.json
-rw-r--r-- 0/0              84 1970-01-01 01:00 repositories

 

Fermer le menu
%d blogueurs aiment cette page :