A Beginner's Guide To Containers
Learn the basics of containers and what they can do for you.
The phrase ‘self-contained execution environment’ might evoke scenes from crime dramas like Homeland, yet this term actually describes one of computing’s biggest growth areas. Since the successful launch of Docker three years ago, containers have become something of a cause célèbre among IT professionals. Their uniquely simplistic design makes them ideal for single-purpose applications – eliminating the conflicts and incompatibilities commonly associated with runtime environments.
What is a Container?
A container is essentially a sealed portion of a server or hard drive that hosts a single application. Everything required for its operation (such as drivers or libraries) is hosted in that unit. Anything else – ancillary, superfluous or unrelated – is kept outside the container. The application effectively runs in a hermetically sealed environment, with no risk of conflict or instability, and this makes it extremely stable. Even operating systems are decoupled from this little bubble of software, which means updates or patches have no effect on the container’s contents.
Are Containers New?
Containers have been with us for decades, but their burgeoning adoption is a direct response to the cloud’s growing prevalence as a hosting platform in its own right. Cloud hosting often involves microservice applications, where a single-function program is designed to operate across as many platforms as possible. Hosting everything in one self-contained environment minimizes the risk of compatibility issues – the nemesis for any app developer or cloud-hosted software provider. Containers provide dependable packaging for applications. These in turn are relied on by customers from anywhere in the world across a variety of platforms.
Why Use Containers?
There are other advantages to using containers. The lack of bloatware or conflicts makes container-hosted apps very quick, with accelerated boot-up times. Their tiny footprint reduces server costs, enabling hosting providers to store hundreds of containers on a single server – in turn driving down costs. There is little need to update the application as operating systems advance, so constant revisions to Android won’t cause any problems to develop, for instance. And Amazon’s recently-launched container service provides an easy point of entry to the global AWS infrastructure, for anything from batch jobs to microservices.
Amazon’s EC2 Container Service is designed to work with Docker – the undisputed leader of container solutions, despite being launched just three years ago as open source software. Its Linux origins were eclipsed back in September, when Windows Server 2016 and Windows 10 finally enabled Docker to run natively – giving it coverage on two of the three big OS. Docker is peerless for facilitating rapid deployment, replication and backup of workloads with stateless storage.
Any Setbacks?
Of course, all containers have their drawbacks. By decoupling applications from supporting hardware, the hardware’s security is often lost; there is growing concern that containers are easy to hack. Dangerously, one compromise potentially provides access to its siblings. The absence of Apple compatibility is a major issue for app developers, while the single-process nature of containers means a variety of containers can be required to handle a series of concurrent processes. This was less of an issue with the old LXC virtualization method, which is largely been supplanted by Docker and more modern rivals. Nevertheless, the robust and high-speed nature of containers makes them valuable for creating lightweight alternatives to virtual machines in cloud-hosted environments.