what is docker images


What is Docker Images

what is docker images ?? Docker images contains your application code and it contains the software which is used to run your application. Docker images contains all programs or software which is used to run your application. With docker image you can create containers. if you want to run your application you have to create the docker containers with docker images. By creating the docker containers from the docker image we can run our applications. Let’s say you have a node js application and To run that node js application we will take the node js docker image and we will create one docker container from that image. after creation of the container we can access the application.

If you want to compile the java code you can use docker maven image. If you want to use Jenkins you can use Jenkins docker image. To use maven or Jenkins or nodejs application you have to create the containers from docker images, in that docker containers the application will run. The official docker images you can find in docker hub(https://hub.docker.com/).

Download The Docker Images-what is docker images

To download the docker images from docker hub we use docker pull command. So when you use this command the docker image will be downloaded from docker-hub to your system.

docker pull  image_name

Ex:

in this example i am pulling Jenkins docker image

what is docker images

After downloading docker images we can verify is docker image is downloaded or not by using docker images command. It will list all your downloaded docker images

Create Docker Containers-what is docker images

Docker containers act like a small virtual machines. You can create number of docker containers with docker images in your system and you can run your applications. In the previous example we downloaded the docker image from docker hub by using docker pull command. To start or to use the application we have to create container from the docker image for that we use docker run command.

To create docker container from docker image we use docker run command

docker run -itd -p 8080:8080 jenkins/jenkins:lts

This command will create docker container from the docker image. You can verify is docker container is created or not by using “docker ps” command. Docker ps command will list all your docker containers. In the above image you can see the output of docker ps command it will show the container id,Image. Container id is nothing but an id which is created for every container. so you are assigning one id to that particular container if you create the container docker will automatically assign one container id. Here image is nothing but docker image which is used to create this container.

 

  • what is docker images
  • docker images
  • images docker

Do You Want To Become An Expert in Devops?
                                    Subscribe To DecodingDevops
                                Get New Posts To your mail Inbox

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Decoding DevOps will use the information you provide on this form to be in touch with you and to provide updates and marketing.