Early this year I learned about Docker and fell in love with this cool technology. It is so helpful to quickly create a contained and controlled environment, share an identical environment with team members, bug reporting, testing etc. I will provide some pointers on the following for someone interested in getting started with their Docker journey.
- Docker Basics
- Docker container vs. VM
- Installing Docker
- Hands-on experience with Docker
I have not tried managing Linux containers myself without the help of Docker but when I read about it, I felt that it wasn’t a simple process; specialized Linux knowledge was required. Docker can be a handy tool for managing Linux containers easily.
So what are containers? Containers are lightweight isolated sections of operating system in which the application service resides.
And how does one create a Docker container? To create a Docker container, we need a Docker image. Images are a pre-packaged set of instructions that can be used to build and run containers.
Where does one get a Docker image? You can either get it from the Docker Hub or create your own using a Dockerfile. A Dockerfile is a specially formatted text file containing a list of instructions that will result in a Docker image that can be used to make a Docker container. It makes the process of creating customized Docker containers less manual.
Docker container vs. VM
So is Docker container just a Virtual Machine (VM)? No.
VMs are not application delivery platforms. They are mainly for infrastructure delivery. We can compare VM to a house and Docker container to a shared flat. VMs get their own set of resources, they are much more isolated and are considered heavy w.r.t setup due to the number of resources they require.
On the other hand, Docker containers are considered lightweight since they require fewer resources. They share the common infrastructure of the host such as kernel, network, memory etc. If you want full isolation with guaranteed resources, use a VM rather than a Docker container.
The simplest way to install Docker is to download one of the official Docker applications – https://docs.docker.com/engine/installation/
Hands-on experience with Docker
To get hands-on experience with Docker, I highly recommend making use of the resources at http://training.play-with-docker.com/
Next up …
In my next blog post, I will provide a cheat sheet for commonly using Docker commands. So long for now 🙂