mooc-notes

Notes from online courses

View on GitHub

Introduction to Docker - Cloud Academy course by Ben Lambert

Introduction

Part 1 - Course Intro

Learning objectives
Agenda

Part 2 - What is Docker?

Docker is a container platform that allows you to separate your application from the underlying infrastructure by bundling up your code and all of its dependencies into a self-contained entity that will run the same on any supported system.

Picture an actual physical shipping container. You can use a shipping container to transport anything that will fit inside. Since shipping containers come in standard sizes, they’re easier to manage because they’re consistent. It really doesn’t matter what’s inside the container because the infrastructure used to transport them is the same.

Challenges in SE: deploying code, managing dependencies, handling rollbacks, etc. All of these things are made more challenging because the development environments are seldom identical to production and this is where Docker containers can help. Docker containers are similar to their physical namesake.

They allow you to take whatever software you need to run, bundle it up into a consistent format, and run it on any infrastructure that knows how to handle a container.

Having your code run inside of a container means that it’s isolated from other processes and other containers. So each container can have its own process space, its own network stack, resource allocation, etc.

Docker containers vs. VMs


Part 3 - Docker Architecture

Containers are not new, Docker just made them popular.

Why did Docker become so popular?

Docker is actually built on some very well established Linux kernel features, that when combined together, allow processes to be run in isolated environments.

Linux kernel features that Docker uses


Part 4: Installing Docker

skipped


Features

Part 5: Creating and Executing your First Container Using Docker


Part 6: Images vs. Containers


Part 7: Images from the Dockerfile


Part 8: Images from Containers


Part 9: Port Mapping

Example

Part 10 - Networking

Example
Bridge
Host
None

Part 11 - Introduction to Persistent Storage Options in Docker

Bind mounts
Volumes
Temp FS

When in doubt on which volume type to use, use Volumes


Part 12 - Tagging

How to tag an image?
How to push an image to Docker Hub?

Summary

Part 13 - Summary

  1. What is Docker?
  2. Docker Architecture
  3. Installation
  4. Creating Containers
  5. Images vs. Containers
  6. Images from the Dockerfile
  7. Images from Containers (docker commit)
    • Best practices for creating images
      • Keep the image as small as possible
      • Use official public images as base images
      • Ensure images have one purpose
      • Reduce the number of layers
  8. Port Mapping
  9. Networking - Bridge, Host, None
  10. Volumes - Bind, Volume (recommended), TempFS
  11. Tagging
  12. Summary