What is Docker?
What is Docker?
Introduction
Docker is an open platform for developing, shipping, and running applications. Its core idea is to package an application and the components it requires into a standardized container image and then run that image as a container.
This helps separate the application from much of the underlying infrastructure. Docker's documentation describes containers as loosely isolated environments containing what the application needs to run.
Simplified Workflow:
Developer
│
Application + Dependencies
▼
Dockerfile
│
▼
Docker Image
│
▼
Docker Registry
│
▼
Docker Container
│
▼
Application Runtime
Why Docker?
Consider a Python application requiring:
Python 3.x
pandas
numpy
requests
application code
configuration
system libraries
Without containerization, developers may install these dependencies directly on their machines.
One developer may have:
> Python 3.11
while another has:
> Python 3.12
and production may use a different environment.
Docker allows the application environment to be packaged into an image so that the same image can be used across development, testing and deployment environments.
Docker specifically highlights consistent development, testing and deployment as one of its use cases.