2

I found this information on the Docker Website

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

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".

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").

Thanks!

Community
  • 1
  • 1
Bohne
  • 4,029
  • 1
  • 16
  • 22

1 Answers1

5

You can save a container with

docker save see https://docs.docker.com/reference/commandline/cli/#save

and restore them otherwhere with

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

nor the associated volumes from

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

For that there is a project

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

user2915097
  • 30,758
  • 6
  • 57
  • 59
  • This is the answer for moving images, not containers. For containers, see e. g. http://stackoverflow.com/a/21323868/586754 . – Andreas Reiff Mar 29 '16 at 12:02