Docker is a mature, production grade technology to run multiple applications on the same host with total segregation.
To clear up a common misconception, containers are NOT mini virtual machines.
When we create a Docker image with the FROM directive, Docker only adds the slimmed down version of the Linux distribution we specified, so our application thinks it is running in that Linux distribution. This makes it possible to run the package manager and other software, specific to that distribution in the container.
The rest of the Dockerfile customizes the image to add packages, set the environment, specify the first command to execute, and install our custom application.
The Linux kernel natively supports the total segregation of applications in namespaces, and able to limit the CPU, memory, disk and network usage of each namespace, so those can coexist without taking all resources from each other.
The applications of the container run natively on the host computer’s kernel in isolated disk, process, network, interprocess communication, hostname, and user namespaces. This allows them to run with minimal performance penalty, making containers much more efficient than Virtual Machines.
To see your containerized applications running on the Linux host, execute
This does not work on Macintosh, as Docker runs in a virtual machine on macOS.
To learn Docker
To learn Docker Swarm
- Docker commands
- Docker commands to run images
- Docker Compose commands
- How to create a Docker repository in Artifactory
- Connect to a database in a Docker container from a VirtualBox virtual machine
- How to remove all Docker containers and images from the host
- Docker in Windows 10 via VMware Fusion on a MacBook Pro
- Docker for Windows cannot start: “Hardware assisted virtualization and data execution protection must be enabled in the BIOS”
- x509: certificate signed by unknown authority
- Troubleshoot stopped containers
I want to thank Robert Lestak for many of his great Docker scripts.