What is Docker
Here’s a quote from Wikipedia:
Docker is an open-source software project that automates the deployment of applications inside software containers, providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux.
As you can see, Docker is a technology that provides containerization.
How to View Docker
Lightweight applications, unified development and production environments, reduced ops costs.
That’s my simple take on Docker from a personal user’s perspective. From an enterprise angle, there’s more it can do, such as container cloud services, though they’re not yet fully mature. I believe it will find its market value, much like cloud computing.
Let me talk about how to use Docker from a developer and user’s perspective.
Getting to Know Docker
Docker is an open-source application container engine that allows developers to package their applications and dependencies into a portable container, then deploy it on any popular Linux machine.
This feels similar to a Java JAR file — package it up and run it anywhere there’s a JRE. The difference is that Docker provides an entire complete environment.
Containers use a complete sandbox mechanism with no interfaces between them (essentially like virtual machines). But unlike VMs, there’s almost no performance overhead, and they can run easily on machines and in data centers. Most importantly, Docker doesn’t depend on any language, framework, or even operating system.
Docker’s goal is to provide a lightweight OS-level virtualization solution. Docker is built on Linux Containers (LXC) and similar technologies. For more details on how it differs from VMs and what LXC actually is, check the official documentation. I also recommend several articles from the DOCKER Basic Technology series on coolshell.cn — they’re quite accessible.
DOCKER Basic Technology: http://coolshell.cn/articles/17010.html
Practical Usage
For now, I only use Docker to unify my development environment, so I don’t have much specific methodology to share. But I’ll list a few beginner’s paths for reference:
- Understand Docker concepts clearly, especially the differences from virtual machines. This is important — after all, you shouldn’t choose Docker just because it’s trendy.
- Create your own containers. Theory is one thing — get your hands dirty. Docker.com servers are overseas, so a VPN is essential, otherwise pulling a single image can take a day. Another option is domestic cloud providers offering container services — a quick Baidu search should find ones with free 1-container trials.
- Docker private registry. No explanation needed — set one up on your company’s internal server, and everyone can use your images.
Reference Resources
Open-source book: Docker — From Beginner to Practice