What is a Docker container?

It is a collection of programmes, including all of their dependencies, that operate on the same OS kernel as the other containers, which run in distinct processes within the operating system in user space. Docker isn’t linked to any specific IT infrastructure, so it can operate on any machine or in the cloud. We can either build a Docker container from scratch using Docker images and then launch it, or we may utilise images from the Docker Hub. Let’s pretend that Docker containers are merely runtime instances of the Docker image to keep things simple.

Docker Container is a mini os which runs on top of an OS(Linux/Windows). When you install Docker, the underlying docker libraries take care of how docker will talk to underlying OS and for your container everything is same. The advantage is the platform independence. Once you have created a docker Image this can be ported on any other machine and when you run this docker image ( running docker image is called docker container) basically it will behave same everywhere.