Software containers
What are software containers?
It is virtualizing an operating system so that it is used to run any application or a software
process. The container has all the necessary tools, libraries and binary code to execute the
application. What's so special about them you might ask, it's basically the fact that they do
not have operating system images!
Containers solve the problem of portability as the software inside them can move and work
on different operating systems on different computers and environments. They move without
the operating system which makes them so lightweight. They hold the application with all it's
dependencies and libraries. The containers ship, build and deploy the application. Yet a
container does not have an operating system.
Things needed to execute code:
1. Tools for programming
2. library folder
3. binary folder
4. operating system that performs system calls.
Software containers are used to build and run anything because it has the runtime
environment, the application itself and the library folder plus the binary folders essential for
executing the code. A software container does not need a kernel.
Differences between virtual machines and software containers:
Virtual Machine Software Container
If there are three vms If a server is running
then three operating three containerized
systems are running plus applications, they're
the hypervisor's sharing the kernels OS.
so one OS is running.
Takes less space and is
lightweight. each
Takes a lot of space cause
container has only the
of all the OSs.
application and it's
dependencies.
Takes a lot to start
because of the operating Almost starts instantly.
systems.
Virtualizes hardware Virtualizes software
Software containers encapsulates the application into one executable package which has
application code together with all it needs to run. It can move from one machine to another
because it runs on one operating system and is lightweight.
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 center and even the cloud.
Docker
Docker is a popular runtime environment used to create and build software inside containers.
It uses Docker images (copy-on-write snapshots) to deploy containerized applications or
software in multiple environments, from development to test and production. Docker was
built on open standards and functions inside most common operating environments,
including Linux, Microsoft Windows, and other on-premises or cloud-based infrastructures.
Containerized applications can get complicated, however when in production, many might
require hundreds to thousands of separate containers in production. This is where container
runtime environments such as Docker benefit from the use of other tools to orchestrate or
manage all the containers in operation.
Docker terms:
interacts with the
operating system. Allows
Docker engine
running different
containers.
contains runtime
package of code tools,
libs and bins. without
operating system.
Docker container
consists of: docker
image, execution
environment, set of
instructions.
A union of layered file
systems stacked on top
Docker image of each other. An image
does not have a state
and never changes.
Cloud hosted service that
provides registry
Docker hub
capabilities for public and
private content.
Hosted service
Docker registry containing repositories of
docker images.