Download as pdf or txt
Download as pdf or txt
You are on page 1of 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