Docker容器(非Docker图像)可以移动吗? [英] Can Docker containers (NOT Docker images) be moved?

查看:282
本文介绍了Docker容器(非Docker图像)可以移动吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Docker网站上发现了这些信息


Docker容器可以运行,启动,停止,移动和删除。

Docker containers can be run, started, stopped, moved, and deleted.

据我所知,Docker-Images可以移动,Docker-Containers不能。但是上面的信息清楚地在标题Docker容器下面。

As far as I know, Docker-Images can be moved and Docker-Containers can't. But the information above stands clearly below the headline "Docker containers".

所以我想知道容器是否可以移动(如果不是):什么是意思是Docker容器可以移动)

So I would like to know, whether containers could be moved or not (and if not: What is meant with "Docker containers can be moved").

谢谢!

推荐答案

您可以使用

docker save
保存容器
https://docs.docker.com/reference/commandline/cli/#save

并将其他地址还原为

docker load
请参阅
https://docs.docker.com/reference / commandline / cli /#load
(它只是一个tar文件)

docker load see https://docs.docker.com/reference/commandline/cli/#load (it is just a tar file)

但是,请记住,这不会保存容器

but keep in mind this will not save the volumes of the container

https://docs.docker.com/userguide/dockervolumes/#data-volumes

也不是与

https://docs.docker.com/userguide/dockervolumes/#creating-and-mounting-a-data-volume-container

对于那个有一个项目

docker-backup
https://github.com/discordianfish/docker-backup

docker-backup https://github.com/discordianfish/docker-backup

这篇关于Docker容器(非Docker图像)可以移动吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆