Table of content: https://docs.google.com/document/d/1IIOkivkS0lV9QIL16b_OjT480BxZHQfKswvvS-CVZlw/view

Docker

Setting up

https://docs.docker.com/install/linux/docker-ce/debian/

  1. Trust Docker's key
  2. Add repository
  3. Update
  4. Install package
  5. Test: "docker --version", "sudo docker run --rm -it hello-world"
  6. Add rights to user

Typical Docker command

# docker run --rm -it alpine /bin/sh

Unable to find image 'alpine:latest' locally

latest: Pulling from library/alpine

b56ae66c2937: Pull complete (Downloading, Extracting)

Digest: sha256:d6bfc3baf615dc9618209a8d607ba2a8103d9c8a405b3bd8741d88b4bef36478 Status: Downloaded newer image for alpine:latest

/ # echo hello

hello

Dockerfiles

Simple sample Docker file:

FROM alpine:latest

RUN \

    echo hello > /world.txt

COPY myshell /theshell

ENTRYPOINT /theshell

Command line:

docker build . -t mycontainer

docker run --rm -it mycontainer


"Pillars" of Docker

Isolation levels

Cloud approach vs classical approach

Classical approach

Cloud approach