post-image

Hướng dẫn lưu docker image thành file (docker save)

Tổng quan

Để lưu docker image thành file ta dùng lệnh docker save:

docker save -o <path for generated tar file> <image name>
Code language: HTML, XML (xml)

Ví dụ: mình đang có 2 images là ubuntu:18.04 và registry:2. Bây giờ mình sẽ lưu image ubuntu:18.04 thành file ubuntu.18.04.tar

Okay, Done!

Nguồn: https://stackjava.com/docker/huong-dan-luu-docker-image-thanh-file-docker-save.html

References:

https://docs.docker.com/engine/reference/commandline/save/

https://docs.docker.com/engine/reference/commandline/image_save/

Leave a Reply

Your email address will not be published. Required fields are marked *