Docker Intro
Build, ship, and run any app, anywhere
Objectives
What are we going to cover
What is Docker
When to use Docker
Practical exercise
Before
After
docker run first time
docker run a second time
A new container is built
Before Docker
After Docker
Docker builds containers using ten major
system features:
Getting organized
Without Docker, a
computer can end
up looking like a
junk drawer.
Running programs with Docker
PS: Docker packaging system typically reduces the storage overhead.
Improving portability
At present, Docker runs natively on Linux and comes with a single virtual
machine for OS X and Windows environments.
On OS X and Windows, Docker uses a single, small virtual machine to run all
the containers.
This new portability helps users in a few ways:
It unlocks a whole world of software that was previously inaccessible.
It’s now feasible to run the same software —exactly the same software— on any
system
Protecting your computer
Why is Docker important
For a modicum of effort, Docker can save your business a lot of money
quickly:
1. Easier install – configure once, install any times & easier application removal
2. Significant push in the software community to adopt containers and Docker
3. Cross-platform and open way
4. Better adoption of some of the more advanced isolation features of operating
systems
What is Docker good for
Replaces virtual machines
Prototype software
Packaging software
Enabling a microservices architecture
Modelling networks
Enabling full-stack productivity when offline
Reducing debugging overhead
Documenting software dependencies and touchpoints
Enabling continuous delivery
Where and when to use Docker
Docker can only run applications that can run on a Linux operating system or
Windows applications on Windows Server
Typical examples of programs running in a Docker container:
Server applications:
web servers
mail servers
Databases
proxies, and the like.
Desktop software:
web browsers
word processors
email client, etc.
Containers won’t help much with the security of programs that have to run with
full access to the machine.
Core Docker
concepts
Docker
Images and
Containers
Building a Docker
application - I
We’ll learn:
How to create a Docker image
using a Dockerfile
How to tag a Docker image for
easy reference
How to run your new Docker
image
Prerequisites
Install Docker
https://docs.docker.com/docker-for-windows/install/#what-to-know-before-
you-install
https://docs.docker.com/docker-for-windows/
Options to create Docker Images
Writing a Dockerfile
Building
a Docker image
Add a meaningful tag name (optional)
Running a Docker container
Docker layering
docker history
Docker history displays the intermediate layers of an image:
Common Docker Commands
Docker in the Larger Ecosystem
Tools were developed to solve problems like:
container orchestration
high-availability clustering
microservice life cycle management
visibility
Kubernetes is the most notable project in the ecosystem
Powerful, but expensive learning curve and ongoing support effort
Cloud providers come with their managing offers
docker help
docker help