Docker: How to extract the Docker image into local system

前端 未结 2 1375
余生分开走
余生分开走 2021-02-10 11:19

I want to extract the Docker image (from Ubuntu server) into my local system (Linux machine).

I run the following command

docker exec -it containername_         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-10 12:07

    You can use docker's export tool for this. docker export will output the contents of a container into a .tar file;

    $ docker export container_name > output.tar
    

    See the docker docs for more information: https://docs.docker.com/engine/reference/commandline/export/

提交回复
热议问题