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

17_Docker

Docker is a platform for containerization, allowing users to create, manage, and run containers using tools like Docker Engine, Images, and Docker Hub. Key components include Docker Daemon for background processes, Volumes for permanent data storage, and Docker Compass for managing containers. Instructions for downloading Docker, pushing images, and running containers are provided, along with commands for managing Docker environments.

Uploaded by

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

17_Docker

Docker is a platform for containerization, allowing users to create, manage, and run containers using tools like Docker Engine, Images, and Docker Hub. Key components include Docker Daemon for background processes, Volumes for permanent data storage, and Docker Compass for managing containers. Instructions for downloading Docker, pushing images, and running containers are provided, along with commands for managing Docker environments.

Uploaded by

Yash Nagar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Docker Theory:

Docker is a platform and a set of tools basically to achieve containerization.


Docker provide you that containers concept so that you can run your software
inside docker.
Docker is basically a platform & the set of tools which you have talked about to
run the containers so that it will be Potable, Secure & Scalable.
The first component we have here is:
1.Docker Engine: The engine is a basically responsible for
1.Creating Containers
2.Managing Containers
To interact with the Docker, we use some command.
2. Images: Blueprint of container or lightweighted file of your running container
which you can simply save it. It will create an image & then you can simply use
the image to run the container on some other machine.
3. Docker Hub: This is the cloud storage or a cloud service where you can
upload and download the images.
4. Volumes: It is used to store the data permanently.
5. Docker compass: Docker Compass is a developer experience platform that
helps you manage and understand your Docker containers.
 How to download docker in the Laptop/PC:
Google  Docker Download  Choose Official Site  Choose” Download for
Windows”  when completed double click and install Docker.
Now open the “Docker Desktop” in the Laptop/PC.
There are 2 ways to push the Images into the Docker Desktop:
1.Search by Name and pull the Authorized Official image
2.By Terminal/CMD  docker run image_name
Ex: docker run hello-world
There are 2 ways to verified the images available in the Docker or not
1.By Checking the Docker Desktop
2.By Commands:
The commands are followed:
docker ps  provides a list of the Docker container on your machine.
docker ps -a Details of the Container
docker images  To check the images in the docker
docker rmi Image_id Delete the image
docker rm Container_id Delete the container
Note: To Delete the image, you have to first delete the container.
docker search image_name Search the Image
docker pull Image_name Pull the image into the Docker
docker create Image_name Create Container
docker start Container_IDTo start the Container
docker stop Container_IDTo stop the Container
docker pause Container_IDTo pause the Container
Docker Architecture
1.Docker Client  It is a part of docker, no need to install it Separately.
2. Docker Where we have the images and the Container.
3. Registry The place where we have the Docker images.
Important: In the Docker there are few points, which we discussed earlier
1. Images
2. Containers
3. Networks
4. Volumes
5. Dameon
So now we discuss about the Deamon, and we called as Docker Daemon.
Docker Daemon: It is a background process, who pulls the images, creation the
containers, run the container, configure network, or you want to connect with
it and also create the volumes with the help of the command which we give, so
when we send a request.
The request goes to the API & then API knows what it need to do, with help of
the Docker Daemon.
Note: The process is running called dockerd.
Running JDK docker container
1.docker search openjdk
2.docker pull openjdk (please check the version and install it)
3.docker images
4.docker run Image_ID
When we hit this command, the container will start and stop, so if you want to
running continuously
5.docker run -it Image_ID
 packaging the SpringBoot web app
1.Create a Spring Boot Project & test it locally, once testing done
2.In the pom.xml file  Go to build add final Name
<finalname> rest-demo </finalname>
3. Afte this open cmd from STS & run command MVN Package.
 Running SpringBoot WebApp on Docker

You might also like