The application itself is very simple so that you are not too distracted by what the code is doing. After all, the value of Docker is in
how it can build, ship, and run applications; its totally agnostic as to what your application actually does.
Prerequisites
While well dene concepts along the way, it is good for you to understand what Docker is (https://www.docker.com/what-docker)
and why you would use Docker (https://www.docker.com/use-cases) before we begin.
We also need to assume you are familiar with a few concepts before we continue:
A container is a runtime instance of an image what the image becomes in memory when actually executed. It runs completely
isolated from the host environment by default, only accessing host les and ports if congured to do so.
Containers run apps natively on the host machines kernel. They have better performance characteristics than virtual machines that
only get virtual access to host resources through a hypervisor. Containers can get native access, each one running in a discrete
process, taking no more memory than any other executable.
https://docs.docker.com/getstarted/ 1/4
6/1/2017 GetStarted,Part1:OrientationandSetup|DockerDocumentation
Virtual machines run guest operating systems note the OS layer in each box. This is resource intensive, and the resulting disk
image and application state is an entanglement of OS settings, system-installed dependencies, OS security patches, and other easy-
to-lose, hard-to-replicate ephemera.
Container diagram
https://docs.docker.com/getstarted/ 2/4
6/1/2017 GetStarted,Part1:OrientationandSetup|DockerDocumentation
Containers can share a single kernel, and the only information that needs to be in a container image is the executable and its
package dependencies, which never need to be installed on the host system. These processes run like native processes, and you can
manage them individually by running commands like dockerps just like you would run ps on Linux to see active processes.
Finally, because they contain all their dependencies, there is no conguration entanglement; a containerized app runs anywhere.
Setup
Before we get started, make sure your system has the latest version of Docker installed.
Install Docker
(https://docs.docker.com/engine/installation/)
You should be able to run dockerrunhelloworld and see a response like this:
$dockerrunhelloworld
HellofromDocker!
Thismessageshowsthatyourinstallationappearstobeworkingcorrectly.
Togeneratethismessage,Dockertookthefollowingsteps:
...(snipped)...
Now would also be a good time to make sure you are using version 1.13 or higher
https://docs.docker.com/getstarted/ 3/4
6/1/2017 GetStarted,Part1:OrientationandSetup|DockerDocumentation
$dockerversion
Dockerversion17.05.0cerc1,build2878a85
If you see messages like the ones above, youre ready to begin the journey.
Conclusion
The unit of scale being an individual, portable executable has vast implications. It means that CI/CD can push updates to one part of
a distributed application, system dependencies arent a thing you worry about, resource density is increased, and orchestrating
scaling behavior is a matter of spinning up new executables, not new VM hosts. Well be learning about all of those things, but rst
lets learn to walk.
On to Part 2
(https://docs.docker.com/get-
started/part2/)
Customers (https://www.docker.com/customers)
Partners (https://www.docker.com/partners/partner-program)
Management (https://www.docker.com/company/management)
Careers (https://www.docker.com/careers)
Product (https://www.docker.com/products/overview)
Pricing (https://www.docker.com/pricing)
https://docs.docker.com/getstarted/ 4/4