3. Docker Introduction
What is Docker:
Docker Provides a uniformed wrapper around a software package:
«Build, Ship and Run Any App, Anywhere»
Similar to shipping containers: The container is always the same,
regardless of the contents and thus fits on all trucks, cranes, ships,
...
[www.docker.com]
5. Docker Use Cases:
1)Running multiple isolated environments on a single server.
2)In earlier days setting up new environment would take days, with VMs and virtualization this time got
reduced to few hours, and now with Docker containers it’s a matter of few minutes.
3)Docker allows operating system to be part of deployment, if your application needs to call operating
system tools it can be achieved portably with Docker.
4)With one environment consuming high resources, other environments won’t get impacted as they run in
separate containers.
5)Moving environment from one server to another server is very easy, it’s just a copy paste of image file.
6)Allows deployment of a pre-packaged application with all respective artifacts and binaries, without being
changed while transitioning from developer’s desktop to production environment.
7)No more “works on my machine, but fails in UAT/Production”, since the same image will travel from
developer’s desktop to UAT and then to Production.
8)Up-scaling and down-scaling of infrastructure is simple and easy with image/container cloning.
6. Scenarios where Docker is best suitable:
1.One application environment hosted on server A is running on very high load, impacting other environment running on
same server A. The troubling application can be moved easily to server B where free resources are available.
2.Server A is running with bottleneck resource (CPU + RAM + Disk) utilization, with 4-5 high load environments, while server B
is underutilized with 2 low load environments. High load environments can be moved from server A to server B to utilize the
resources available there.
3.New code is deployed on developer’s environment and tested successfully, the same image can be further promoted to
UAT and production environments without missing on any of the code changes/configurations/associated binaries in
transition.
4.A temporary environment (UAT/Production replica) is required for debugging and issue which can be removed afterwards.
5.A temporary environment is required to test a new feature or new code without impacting the current ones.
6.Extra environments needs to be added to cluster to handle the upcoming the high load/traffic on systems (upscaling),
which can be released after the load is normalized (downscaling).
7. Docker Development Environment
Docker Development Environment
• Centralized management of build & release
• Automated build release cycle
• Older version availability in central repository
with quick deployment as container
• Quick deployment of new containers and
scalability
Tools:
• Docker Repository
• Jenkins
Docker
Build/Jenkins
Docker Host
Product Engineering
Docker Repository
Server
Step#1 Docker Image to
Central Repository- Push
Step#2 Command to Pull image
from Repository
Step#3 Docker Daemon will
pull image from repository and
start a new container
Docker Host
Product Support
9. Benefits Achieved With Docker Implementation
1. Same Docker image travels from development environment to Production, removing issues
of “works on my machine/internal environment –but- breaks in production.
2. Running 25-30 containers on a single machine for all developers in team as a local
development environment, giving us optimised use of underlying hardware.
3. Only delta changes (Docker layers) are transferred to remote production environments –
transfer time reduced by ~75%
4. Implementation efforts and time reduction (Enhanced Productivity) :
Activity Legacy Way After Docker
- Application + Patch
- Only Patch deployment
- Post installation steps
2-3 Days (Multiple Instances)
2 Hrs
1-2 Hrs
7-8 Hrs
20 Mins
Not Required