Containers

Automation Consultants makes use of containers in its services to make your infrastructure more efficient.

Containers are at the centre of dev ops, and are prevalent in large scale clouds. If you use a cloud computing service from Google, Facebook, Microsoft or any large SaaS provider, the chances are that the software at the server end is running in a container. Docker provides the industry standard for containers.

Docker containers can be thought of as cut-down virtual machines. They can host applications, and they provide an isolated environment in which an application can run. The main differences are:

  • Containers are lightweight: they require less storage than a VM, and when run, they take up far less memory – often little more than what is needed for the application they contain.
  • Containers are fast: they can be started and stopped in milliseconds instead of minutes.
  • Containers are intended to be disposable. It is normal to start them from an unchanging image (i.e. a template), and discard them once they are stopped. Application data is kept on shared or network drives and persists after the container is destroyed. Any changes made to the container’s internal files and thus its configuration are lost. This ensures that when a new container is spun up from the template, its settings and configuration are identical to those of previous containers created from that image.
  • Docker has a versioning system. If it is desirable to keep changes made to a container, it can be saved as a new version of the image. The changes between versions are recorded and can be displayed.

The benefits of containers include

  • Consistent environments in development and testing: bugs which appear in one environment will appear in the others. Containers are increasingly used in CI/CD, by such systems as Drone and Shippable.
  • Developers can code in environments which more closely resemble production. The services which exist in production can each be run in a container in the development environment, thanks to containers’ light weight.
  • Multiple applications can be run in containers in the same machine without interfering with each other.
  • Ease of sandboxing for debugging. If a bug is discovered, a sandbox environment can be created very rapidly and fixes then deployed rapidly to production.

In large scale clouds, containers are deployed by the thousand, and must be managed by an orchestration system such as Kubernetes or Docker swarm mode.