What is Docker?
Docker is an open-source containerization platform that helps developers package applications and their related dependencies into a lightweight, portable environment called “containers.” These containers can run in various environments, such as developers’ laptops, testing environments, deployment servers, etc., without worrying about differences in environments and dependency issues. Otherwise, coding would be so painstaking; discovering that your code can’t run on someone else’s machine or having anxiety deploying to production really ruins your day.
Why Use Docker?
Here are 5 main advantages:
Cross-platform Consistency
: Docker containers are lightweight and self-sufficient, containing the application and all its dependencies. This ensures consistent behavior across different environments, eliminating the “it works on my machine” problem.Superior Performance
: Docker containers are very quick to start and stop because they share the host’s core operating system, reducing the overhead of virtualization. This makes deployment and scaling of applications more efficient.Resource Isolation
: Each container runs in its own isolated environment, meaning applications between containers do not interfere with each other. This isolation makes containers more secure and easier to manage.Portability
: Docker containers are lightweight, portable, and have a consistent runtime environment, making it easy to move applications and their related components from one environment to another, such as from development to testing to production.Rapid Deployment
: With Docker, you can easily deploy applications quickly in various environments and scale as needed. This helps reduce deployment time and increase delivery speed.
As an engineer with a bit of cleanliness OCD, I really don’t want to mess up my computer, you know… I mean installing various software and development environments like Apache & Nginx, Python 2.7, Python 3.4, OpenCV 2.4, OpenCV 3.5, Visual Studio… it’s just too much. With Docker, all environments can be downloaded separately as images. You can run an image as a container, which becomes an independent environment. If you don’t like it, just delete it anytime, or adjust the settings and generate a new container anytime. It’s super convenient.