Docker for DevOps Engineers

I write blogs about DevOps current and emerging tools/technologies.
#Day16 of #90DaysOfDevopsChallenge
Docker is an open-source platform for developing, packaging and deploying applications in a containerized environment. Containers are lightweight and portable virtual environments that can run on any system that supports Docker.
✅Use the docker run command to start a new container and interact with it through the command line. [Hint: docker run hello-world]
Local system update:
sudo apt-get update

command to check the docker version

use the following command to start Docker
sudo usermod -aG docker $user
systemctl restart docker
Note: If the permission denied error occurs, use the below command and enter the password.

To check the docker status
systemctl status docker
Use the pull command to download the image
docker pull python

To check all the docker images :
docker images
Create a container from the above image:
docker run -it <image name> /bin/bash
To start a new container and interact with it through the command line, you can use the following command:
docker run -td --name <cantainer name> -p 80:80 <image name>

To see all the containers:
docker ps -a

✅Use the docker inspect command to view detailed information about a container or image.
docker inspect <container name>

✅Use the docker port command to list the port mappings for a container
docker port <container name >

✅Use the docker stats command to view resource usage statistics for one or more containers.
docker stats <container name>

✅Use the docker top command to view the processes running inside a container
docker top <container name or id>

✅Use the docker save command to save an image to a tar archive
docker save -o <image>.tar <image name>

✅Use the docker load command to load an image from a tar archive
docker load -i <image.tar>


Thank you!!



