gjp311 - stock.adobe.com
Convert a VM to a Docker image for speed and convenience
In this excerpt from Chapter 3 of 'Docker in Practice, Second Edition,' authors Ian Miell and Aidan Hobson Sayers discuss how and why to use Docker as a lightweight VM.
As DevOps gained popularity in enterprise-level data centers, so too did containers. So much so that people in IT speculated how long it would be before VMs fell by the wayside. Luckily for long-time virtualization administrators, VMs are still in the picture, but containers have stood the test of time as well. Although containers and VMs both represent a method of resource abstraction, the underlying architecture is different.
VMs are isolated instances with their own copy of the OS, while containers share the underlying OS. Because VMs contain a copy of the OS, they require more resources and take longer to deploy.
Containers, on the other hand, are lightweight instances that admins can quickly spin up and down. VMs make more sense for mission-critical applications because of the added level of security, and containers make more sense for small, mobile applications because of their fast startup time and scalability.
To remain competitive, admins traditionally responsible for managing VMs should broaden their skill sets and familiarize themselves with container technology and use cases. Docker is key to this education, as it's the industry standard for creating, deploying and managing application containers. Part of the reason for this is that it's an open source platform and runs on Linux, Windows and macOS.
Docker enables automated application deployment, flexibility and portability. With Docker Hub, admins have access to public, open source image repositories. They can also create private image repositories for more secure builds.
Download the complete chapter now
Getting started with Docker and containers might seem daunting, but there is relatively simple way to do so. In this excerpt from Chapter 3 of Docker in Practice, Second Edition, published by Manning Publications Co., authors Ian Miell and Aidan Hobson Sayers outline how to convert a VM to a Docker image and best practices for container management.