0% found this document useful (0 votes)
16 views

Docker Image Backup

The document discusses several steps for working with Docker images and containers: 1) Committing changes to an image, 2) Backing up images locally and to Docker Hub, 3) Creating Dockerfiles to build images, 4) Rebuilding images, 5) Changing the timezone in a container using Python.

Uploaded by

shamshuddin0003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Docker Image Backup

The document discusses several steps for working with Docker images and containers: 1) Committing changes to an image, 2) Backing up images locally and to Docker Hub, 3) Creating Dockerfiles to build images, 4) Rebuilding images, 5) Changing the timezone in a container using Python.

Uploaded by

shamshuddin0003
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

DOCKER

Step1:Image amendment convert image to an container.


docker commit <cont ID> <Image name to create>

Step2:IMAGEBACKUP
Local backup -”save” command .
docker save -o /root/myimagebackup.tar <Image name to take local
backup>

Then untar the file using load command,


docker load -i <tar imagefile>

If we remove the main image we have an backup file to relaunch in it.


Step3:cloud backup
docker login
username
Password

Tag command used to push the container.

Then check dockerhub if container is there.


Step4:docker file.
First create the directory for docker file.
mkdir <filename>
cd <filename>
vi Dockerfile
Then name of the docker file should be always same “Dockerfile” and
each directory have only one Dockerfile.

Write and save the script in Dockerfile.

Next convert docker file to docker iamge using build command.


docker build -t <NewImageName> . (or) <path of the file>
Then check docker images or created.

Using same procedure I create two more files.


Step5:then we do rebuild the images .we have already present image to
add some more updates to rebuild the container form this images.then
create a new directory and add a new docker file.

Then build the image using build command.and also check the images
our new rebuild images also there.
Step6:timezone change for container using python.

Then change the file to image using build command ,image to container
using run command and execute command is used to go to the container
page.
Then check our time.

You might also like