Pull and Build Docker Image
Topics to be discussed
- Docker Fundamental and what are the problems docker going to solve.
- What are the advantages of docker.
- Docker Architecture.
- Implementing the major use cases related to the docker.
- Pull an image from docker hub and then run it locally , And test the application.
- Build a docker image locally and push it to the docker Hub.
1. Docker Fundamental and what are the problems docker going to solve.
Docker deliver software in packages called containers.So developer don’t need to worry about missing or incorrect application dependencies such as libraries, interpreters, code/binaries etc.
And the software that hosts the containers is called Docker Engine.
- Installation and configuration were the biggest problem and time consuming in the traditional approach.
- Issues related to libraries and dependencies.
2. Advantages of Docker.
- Complex application can be containerised.
- You can build locally and deploy to the cloud and run anywhere.
- Containers are loosely coupled so you can upgrade one without disrupting other.
- Can easily increase and automatically distribute the container replicas across the Datacenter.
3. Docker Architecture.
4. Docker Installation
Docker Desktop on Windows
Docker Desktop on MAC
5. Pull an image from docker hub and then run it locally , And test the application.
Check docker version in command line.
docker version
Login Into docker.
docker login
Pull docker image from Docker hub into our local machine.
docker pull < image_name >
View docker image if its downloaded into the system or not.
docker image
Run Docker image
docker run --name <app_name> -p 80:8080 -d <image_name>:<tage_name>
List docker
docker ps
View only container ID.
docker ps -a -q
Inside the container.
docker exec -it <app_name> /bin/sh
Stop the docker container or app.
docker stop <app_name>
Start the docker container or app.
docker start <app_name>
Remove Container : we cannot remove running container so first we need to stop the container.
docker stop <container-name> 2docker rm <container-name>
Remove Image
docker rmi <image-id>
To be continue………………
Connect with me:😉
Email- rajputmonika953@gmail.com
LinkedIn: http://linkedin.com/in/monika0104
Github: https://github.com/monika0123
Twitter: https://twitter.com/monikarajput99