Docker:如何将Docker映像提取到本地系统 [英] Docker: How to extract the Docker image into local system
本文介绍了Docker:如何将Docker映像提取到本地系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将Docker映像(从Ubuntu服务器中)提取到我的本地系统(Linux机器)中.
I want to extract the Docker image (from Ubuntu server) into my local system (Linux machine).
我运行以下命令
docker exec -it containername_or_ID /bin/bash
我可以使用此命令查看图像,但是无法将此图像放入本地系统.
I am able to view image by using this command, but I am unable to get this image into my local system.
推荐答案
您可以为此使用docker的 export
工具. docker export
会将容器的内容输出到.tar文件中;
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
有关更多信息,请参阅docker文档: https://docs.docker.com/engine/reference/commandline/export/
See the docker docs for more information: https://docs.docker.com/engine/reference/commandline/export/
这篇关于Docker:如何将Docker映像提取到本地系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文