Docker – A highly Portable and Lightweight software container

Docker, a lightweight Software Container Virtualization
Docker, a lightweight Software Container Virtualization

Coming from a background that dabbles with application, desktop and server virtualization technologies (e.g. Citrix XenApp/ XenDesktop, XenServer, VMware ESXi), the Docker technology seems new and yet familiar at the same time.

Docker is somewhat similar to Java Virtual Machine (JVM) whereby it supports application stack portability across platforms (Linux, Mac, Windows, etc.). The difference is that you are not restricted a particular programming language (like Java in the case of JVM).

You can basically package (any) applications or platforms (e.g. WordPress, Node.js, Git Server) or disk images (e.g OSes like Ubuntu, Centos, Fedora) and run it on the Docker Engine. Best of all, Docker Engine runs on Linux, Mac, Windows, Amazon EC2, Google Cloud Platform, Microsoft Azure, Synology, and the list goes on and on. Basically, you get Application Stack Portability.

 

Don’t mistaken Docker for Virtual Machine technology!

Containers vs VMs. Diagram source: Docker Inc.
Containers vs VMs. Diagram source: Docker Inc.

Virtual machines have a full fledged OS with its own memory management, device drivers, services, etc. Whereas containers shares the host’s OS and therefore lighter in weight. Each Docker container is isolated from each other.

 

So what’s the Docker’s use case?

The first thing that came to my mind is Cloud.

The reason for thinking so is because of application stack portability. Essentially I can build my app on my development environment. Once sufficiently tested and ready for quality assurance test and production release, I just have to move the app container onto the appropriate environment. To make it easier, you can use Git style management (docker push and docker push).

For less stringent environment where you are allowed to use the same server cluster for development, quality assurance and production. The Docker engine isolates the app container from one another.

Imagine running multiple JBoss instances on the same server with each instance having its own configuration and serving a different purpose (development, quality assurance and production). JBoss instance crashing in one container doesn’t affect the others. Sweet.

 

Err, when to use Docker?

You can build up a Docker repository and push or pull new application updates or changes in system. Basically use Docker as part of development and for production. Run the same application on your laptop and server. Distribute or collaborate the app building with a team.

 

Conclusion

Docker’s collaborative nature (docker pull, docker push) and application stack portability across platforms is amazing. It is changing the way applications are developed and deployed without having to worry about the infrastructure needed to run them.

The best part is that you are not restricted to any programming languages. Do give Docker a shot and see if it works out for you. If you are on Synology NAS, you will be surprised that DSM 5.2 comes with the Docker system.

So what am I using it for? For doing random stuffs like having a OpenWrt Build System on a Debian container on both my Mac and Synology NAS; hosting a Node.js platform on my Synology NAS to consolidate data from my internet connected devices/ sensors.