DEV Community

Cover image for Understanding the basics of Docker
Shreeprabha bhat
Shreeprabha bhat

Posted on

Understanding the basics of Docker

While working as a QA I had close interaction with the developers and heard them saying several times about docker and docker images. I even had a discussion with my friend once what docker actually is. And finally when I became a developer myself I got to work with docker and made me know about the basic insights of docker. Today, I am going to share the basic knowledge I gained about docker here.

WHAT IS DOCKER?

Docker is a tool that allows developers to build and deploy their applications easily to the containers to run on host that is linux.
Docker helps to package an app with all its dependencies into standard unit that would benefit software development.

WHAT IS CONTAINERS?

Containers are nothing but the logical mechanism for packaging the application. Several times the application would collapse because of the different versions used on different system. By using containers one can make sure there won't be any service compatibility issue. This would drastically decrease the developer's problem of "It works on my system".

WHAT IS IMAGES?

Docker images are nothing but the read only templates that contains instructions to create containers. They serve as a foundation for containers and encapsulate all the dependencies and configuration needed for an application. Images can either be built from dockerfile or pulled from docker hub.

USING DOCKER

https://docs.docker.com/engine/install/ you can follow up the instructions here to install docker. Once you have installed docker you can check the installation running docker --version.

COMMONLY USED DOCKER COMMANDS AND THEIR USES

docker ps
# Lists the current running containers
docker ps -a
# Lists all the containers including the one that stopped.
docker run -d --name <container-name> <image-name>:<tag>
# Runs a container that is specified
docker stop <container-id>
# Stops a container
docker start <container-id>
# Starts a container that was stopped
docker rm <container-id>
#Removes a container
docker image
# Lists the images
Enter fullscreen mode Exit fullscreen mode

SUMMARY

Docker is a powerful platform that simplifies the development, deployment and management of applications by using containerization.
Docker’s ecosystem, including Docker Compose and Docker Hub, further enhances its capabilities for managing complex, multi-container applications and sharing containerized applications with others.

Top comments (1)

Collapse
 
vidyarathna profile image
Vidyarathna Bhat

Great overview of Docker basics! This article covers everything a beginner needs to know to get started with Docker.