During this 90 minute workshop, you will learn about Docker with hands-on instruction, plus exposure to additional tools and techniques you can combine with it to make productive use of this exciting and powerful tool in combination with OpenStack.
We will cover the fundamentals of Docker, how to use Docker Machine to start Docker containers on an OpenStack cloud, and how to author Dockerfiles.
Prerequisites
• Attendees must have completed the on-line Docker tutorial at docker.io at:
https://www.docker.com/tryit/ • Attendees must have a public OpenStack Cloud account with an valid API token ready to use. You may use the Rackspace Cloud if you do not have one of your own.
• A github account. You will fork a repository for use with our lesson on Dockerfile creation.
The only software needed on your laptop is the docker-machine binary, which requires no installation, and has no extra dependencies, and will be provided to you to download on the day of the workshop.
Outline
This workshop is made up of 3 lessons and 3 labs. When finished, participants will be able to launch containers, kill containers, build container images, and inject configuration into them. Participants will also know how to link and/or network containers over secure connections that allow for composite applications to be split across multiple containers.
• LESSON 1 - PART 1 - Introduction to Docker, Explanation of Cgroups, Kernel Namespaces, and Docker Images. (15 Min)
• LESSON 1 - PART 2 - Toolbox overview. Description of Docker Hub, Trusted build system, Weave, Flannel, etcd, CoreOS, Magnum, Kubernetes, and how Docker works with OpenStack. (15 Min)
• Hands-on LAB 1 - Using docker-machine. Spin up Docker containers on OpenStack, switch between docker hosts. How to run ad-hoc containers on the fly for experimentation, and how to move a container from one host to another. How to get a shell on a Docker host, and how to get a shell in a Docker container without running sshd in the container. (15 Min)
• LESSON 2 - Detailed overview of authoring Dockerfiles. What each of the directives do, which ones we suggest you use. Demonstration of copying files into containers using bind mounts, and copying files out of containers using ""docker cp"". Why Dockerfiles are better than customized images made manually and stored with commit. (15 Min)
• Hands-on LAB 2 - Writing Dockerfiles. Saving a Dockerfile in a source repo, and using a build script for configuration injection. (20 Min)
• Wrap Up. Summary. Where to go to find additional resources.