Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

Help Center/ SoftWare Repository for Container/ FAQs/ General FAQs/ How Do I Create an Image Package?

How Do I Create an Image Package?

Updated on 2022-09-15 GMT+08:00

Run the docker save command to compress the container image into a .tar or .tar.gz package. The command format is as follows:

docker save [OPTIONS] IMAGE [IMAGE...]

[OPTIONS] can be set to --output or -o, indicating that the image is exported to a file.

Example:

$ docker save nginx:latest > nginx.tar
$ ls -sh nginx.tar
108M nginx.tar

$ docker save php:5-apache > php.tar.gz
$ ls -sh php.tar.gz
372M php.tar.gz

$ docker save --output nginx.tar nginx
$ ls -sh nginx.tar
108M nginx.tar

$ docker save -o nginx-all.tar nginx
$ docker save -o nginx-latest.tar nginx:latest
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback