Reputation:
Is it possible to keep backup of docker images?
Here is my docker image:
my@onl-dev:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centdemo latest e0b0d89f6c45 2 days ago 3.322 GB
I have some data in this docker image which I copy from container to host whenever needed.
root@onl-dev:/distros/centos6.6.x86_64# docker cp 9512b894d107:/distros/centos6.6.x86_64 /data/sept15/mess
So I want to keep backup of this docker image such that I can restore it whenever I want to copy the data from container to host.
Upvotes: 1
Views: 666
Reputation: 425
You can simply tag the image with different tag
docker tag <image-name>:latest <image-name>:backup
Nonetheless you can always use the image ID: e0b0d89f6c45
Another option is to store it in a tar.
docker save mynewimage > /tmp/mynewimage.tar
Upvotes: 3