Skip to content

Instantly share code, notes, and snippets.

@ffledgling
Last active March 27, 2018 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ffledgling/36eb6796c1411249e73750a62a95bff2 to your computer and use it in GitHub Desktop.
Save ffledgling/36eb6796c1411249e73750a62a95bff2 to your computer and use it in GitHub Desktop.
Docker Basics Talk

Docker

What is docker?

  • Containerization technology at it's heart
  • Lots of goodies that make containers easy to use as part of the eco-system

What problems does docker solve?

Packaging, isolation, immutability

Old Way vs. New Way: http://kubernetes.io/images/docs/why_containers.svg

Containerization vs. Virtualization

Isolation and control using Namespaces and cgroups (Containers) vs. Hardware simulation (VMs)

Namespaces

List of namespaces http://man7.org/linux/man-pages/man7/namespaces.7.html

Found in: /proc//ns

cgroups

Control Groups, used for accounting

Found in: /sys/fs/cgroups

Create mock root using unshare and namespacing

AKA Cheap container

unshare --mount --uts --ipc --pid --map-root-user --fork --user --setgroups wget http://ftp.iij.ad.jp/pub/openvz/template/precreated/centos-6-x86_64.tar.gz tar -xvf mount --rbind /etc/resolv.conf c6/etc/resolv.conf # Or alternatively create it by hand chroot cat /etc/resolv.conf

Copy-On-Write filesystem

https://docs.docker.com/engine/userguide/storagedriver/images/container-layers-cas.jpg

Practical Docker

Dockerfile

  • Neat way to write up and manage dependecies for your application
  • Sample docker file
  • Full blown Dockerfile

Building a docker container

  • docker build --tag demo:v1 .
  • docker run -it demo:v1 /bin/bash

Push to registry docker push

Kubernetes

What is kubernetes ?

Container orchestration system

Why do we need it?

Makes Load balancing, Self-healing, auto-scaling, rolling-deployments easy.

Kubernetes concepts

  • pods
  • nodes
  • replication controllers
  • services

Alternative Containerization technologies

The Open Container Initiative (OCI)

Initiative to unify and standardize container formats

Resources

Containerization basics

Docker

Kubernetes

This are the informal notes from a talk delivered about Containers, Docker and Kubernetes at Tower in Nov 2016.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment