A container is a like a virtual machine (Not Really).
Technical Definition "A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings*.*"
Docker is a tool that creates/handles the container.
It is an advanced version of virtualization i.e. containerization.
What is Virtualization?
It allows a piece of hardware to run multiple operating system images at the same time
Why did docker replace VM virtualization?
Operating System should be installed on every Virtual Machine
Resources like CPU, memory, and I/O may not be allocated permanently to VMs
Expensive(License OS for every Virtual Machine)
Containerization:
It is a software deployment process that bundles an application's code with all the files and libraries it needs to run on any infrastructure.
What is Docker?
It is an Open Source Centralised Platform.
It can be installed on Windows / Mac / Linux (But for running docker you required Linux Kernel)
It is used for "CREATE, DEPLOY & RUN "
It uses "GO " language
Docker is OS-level virtualization whereas VM-Ware is HW-level virtualization
Advantages Of Docker:
No pre-allocation of any resources i.e RAM, Storage etc
It enables the Continues Integration
It enables to build of a container image
You can use the same image for another environment as well.
No license operating system installation i.e Less Cost
It uses the required binaries/libraries from the host OS so it is Light Weight
You can re-use images and create multiple containers
It takes less time to create a container than create a VM i.e Faster
It can be used for Physical H/W, virtual env or Cloud.
Disadvantages Of Docker
No support for cross-platform.
No solution for data recovery and backups.
Not a good solution for a rich GUI application
Difficult to manage large no of containers
Suitable when Dev and Tester both using the same OS