What Are Containers?
Containers are a form of operating system virtualization. A single container might be used to run anything from a small microservice or software process to a larger application. Inside a container are all the necessary executables, binary code, libraries, and configuration files. Compared to server or machine virtualization approaches, however, containers do not contain operating system images. This makes them more lightweight and portable, with significantly less overhead. In larger application deployments, multiple containers may be deployed as one or more container clusters. Such clusters might be managed by a container orchestrator such as Kubernetes.
Benefits of Containers
Containers are a streamlined way to build, test, deploy, and redeploy applications on multiple environments from a developer’s local laptop to an on-premises data centre and even the cloud. Benefits of containers include:
- Less overhead. Containers require fewer system resources than traditional or hardware virtual machine environments because they don’t include operating system images.
- Increased portability. Applications running in containers can be deployed easily to multiple different operating systems and hardware platforms.
- More consistent operation. DevOps teams know applications in containers will run the same, regardless of where they are deployed.
- Greater efficiency. Containers allow applications to be more rapidly deployed, patched, or scaled.
- Better application development. Containers support agile and DevOps efforts to accelerate development, test, and production cycles.
Container Use Cases
Common ways organizations use containers include:
- “Lift and shift” existing applications into modern cloud architectures. Some organizations use containers to migrate existing applications into more modern environments. While this practice delivers some of the basic benefits of operating system virtualization, it does not offer the full benefits of modular, container-based application architecture.
- Refactor existing applications for containers. Although refactoring is much more intensive than lift-and-shift migration, it enables the full benefits of a container environment.
- Develop new container-native applications. Much like refactoring, this approach unlocks the full benefits of containers.
- Provide better support for microservices architectures. Distributed applications and microservices can be more easily isolated, deployed, and scaled using individual container building blocks.
- Provide DevOps support for continuous integration and deployment (CI/CD). Container technology supports streamlined build, test, and deployment from the same container images.
- Provide easier deployment of repetitive jobs and tasks. Containers are being deployed to support one or more similar processes, which often run in the background, such as ETL functions or batch jobs.
Original article: What Are Containers?
Disadvantages and Challenges
After praising Container, let’s consider the drawbacks and challenges when using Containers:
- Increased complexity due to an additional layer. This affects not only the deployment but also the development and build.
- In addition, managing a huge amount of containers is challenging – especially when it comes to clustering containers. Tools like Google Kubernetes and Apache Mesos can help here.
- The containers share the same kernel and are therefore less isolated than real VMs. A bug in the kernel affects every container.
- Container bases on Linux Containers (LXC), which is a Linux technology. Therefore, we can’t run Containers on other systems and our container is always a Linux system. But Boot2Docker enables the usage of Container on Windows and Mac OS X by using VirtualBox. The Container client runs on the host OS and communicates with the Container daemon inside the VirtualBox. Unfortunately, this is less comfortable and makes daily use clumsy and more complicated than running Containers natively.
- Introducing Containers can be a demanding and time-consuming task. We have to evaluate if it is worth the effort and the increased complexity. The management rejected Containers with the argument, that 3 nodes (production, pre-production and experimental) are not enough to justify the effort… However, when you have a cluster of nodes (when scaling horizontally) or use Continuous Delivery you need an approach to reproduce environments and Containers is brilliant in this. Moreover, Continuous Delivery reduces the time-to-market (new features can be brought to production faster because the deployment and environment setup is automated), which can be used to convince the management.
- There are reservations about Containers in strictly regulated domains (like the banking sector):
- To run a container you need root rights. This can be a problem for some companies, in which the colleagues that are supposed to run and update the application on the production server must not have root rights.
- It is unclear if the usage of Container agrees with certain security standards which have to be fulfilled (like PCI).
- In some companies, there is the questionable rule, that only software from official/trusted sources can be installed on the machines.