DOCKER

Docker:
I spent a day to understand what is Docker and its architecture and the purpose of using it,
also how it relates with testing. Docker is a new word to me, so took time to process it in my mind. 
Docker is an open platform for developing, shipping, and running applications by using containers
Containers is the execution environment for Docker that allows a developer to package up an
application with all of the parts it needs, such as libraries and other dependencies, and ship it all
out as one package. 
In one of the article, they relates Docker with actual physical containers we use for shipping/transport
any goods, which gave me bit of idea to visualise about Docker. 
In high level, it gives me the feel that it is mainly useful for the Developer for their code packaging,
build and deployment and then testing. Many in the internet relating the Container with Virtual Machine
and tell why they prefer container than VM. 
Visual explanation is here, each VM is meant to use the separate Kernel Guest OS, which might be slow
the process where there are multiple VM’s are running on the same server with different Guest OS,
where the Containers run isolated on a shared Host OS and uses less memory. We can even run
Docker Containers in the virtual machines.
In addition, Container can be used in different platforms like Linux, Windows and Mac with minimum
changes that makes job easier in terms of portability and Docker is an open source tool 
Docker provides tooling and a platform to manage the lifecycle of your containers:
  • Develop your application and its supporting components using containers.
  • The container becomes the unit for distributing and testing your application.
  • When ready, deploy your application into your production environment, as a container or an
  • orchestrated service. This works the same whether your production environment is a local data
  • center, a cloud provider, or a hybrid of the two.



Purpose:
Docker streamlines the development lifecycle by allowing developers to work in standardized
environments using local containers, which provide your applications and services.
Containers are great for continuous integration and continuous delivery (CI/CD) workflows
Consider the following example scenario:
  • Developers write code locally and share their work with their colleagues using Docker containers.
  • They use Docker to push their applications into a test environment and execute automated and manual tests.
  • When developers find bugs, they can fix them in the development environment and redeploy them to the test
environment for testing and validation.
  • When testing is complete, getting the fix to the customer is as simple as pushing the updated
image to the production environment.
  • Containers are lightweight because containers are sharing the host kernel (the host operating
system) but can also handle the most complex applications


Responsive deployment and scaling
Docker’s container-based platform allows for highly portable workloads. Docker containers can run on a
developer’s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a
mixture of environments.
Running more workloads on the same hardware
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual
machines, so you can use more of your compute capacity to achieve your business goals. Docker is perfect
for high-density environments and for small and medium deployments where you need to do more with fewer resources.
Docker architecture
Image
  • An image is a read-only template with instructions for creating a Docker container (environment). 
  • OS, Software, Application code all bundled up in a file
Container
  • A container is a runnable instance of an image. 
  • By default, a container is relatively well isolated from other containers and its host machine. 
Dockerfile
  • A text file with the list of steps to perform to create the image
In high-level, we write a Dockerfile, build it we get an Image file and run the Image file to get the Container
Docker Daemon
The daemon is the process that runs in the operating system to which clients talk.


Continuous Integration and Delivery with Docker
Docker allows running the tests in containers as well as isolating your tests in development and deployment


When we run a Docker container, these are the steps Docker actually goes through
  1. Download the image
  2. Unpack the image into a "bundle". This flattens the layers into a single filesystem.
  3. Run the container from the bundle


Comments

Popular posts from this blog

What is a Client and server?

What are the different environments in a software development team?

SECURITY TESTING