The Doppler Quarterly Winter 2016 | Page 40

the workloads and massive amounts of data for testing .
• Consider your own requirements . What works for other large companies may not be right for your container-based applications .
• Don ’ t forget about security and governance . They have to scale as well .
• I suspect that scaling containers will be a bit tricky until more is understood about how containers behave at scale . However , with a good understanding of the proper use of containers and the right technology , you ’ ll be scalable right out of the gate .
Understand The Steps
If you ’ re running Linux already , then installing Docker won ’ t be that complex . However , installing Docker on a Mac or Windows will require a few more steps . Just follow the appropriate OS instructions .
The next step is to attempt to run a Dockerized application . Docker has compiled a public registry of applications available as Docker images , and this community provides many jumping off points for building and running your own container-based applications .
Once Docker is installed and online , run a Docker application image by entering :
sudo docker run – rm -p 3000:3000 image _ name
There are a few more details , but for simplicity ’ s sake , we ’ ll leave them out of this discussion . Note that the “ docker run ” command above is running an image called image _ name . If it can ’ t find the image on your local system , it will check the public registry and invoke it there , if found .
The Docker container is simply an instance of a Docker image , much like applications are instances of executables that exist in memory .
So , you can launch multiple isolated instances of the app as containers on a single host . By adding “ -rm ” to the command , as done above , Docker is instructed to remove the container from memory once it completes its task . This has the effect of removing any changes to the local environment that the application may have made but keeps the cached image .
Building a Docker image for an application requires starting with a base image for the core OS , which runs in Docker . Install and configure the necessary tools , and then use the Docker “ commit ” command to save the container as an image . Finally , push it to the public Docker image registry or keep it private .
Another way to create an image is to note the steps required to build the image in a well-formed Dockerfile file . This automates the process of installing and configuring the application , creating a repeatable process .
38 | THE DOPPLER | WINTER 2016