docker

intro

 a short one

demo

yay

docker

  • Heard of it?
  • Used it?

Software

  • Heard of it?
  • Used it?
  • Wrote it?

Environments

  • development
  • staging
  • production

by machine role

Environments

  • development - server-side
  • development - client-side
  • development - tests
  • quality assurance
  • operations
  • etc

by team member role

Environments

  • OS version, updates
  • run-time (Java, .NET, nodejs)
  • databases
  • other software
  • all of the above (combinations)
  • matrix from hell [1]

setup

The matrix from hell

https://blog.docker.com/2013/08/paas-present-and-future/

Environments

  • Phoenix server [2]
  • Immutable server [3]

solutions

docker

  • docker.com
  • Platform for containerising software
  • “Enables independence between applications” [4]
  • VERY NICE
  • what does it mean, though

again

docker

  • Linux kernel black magic
  • Not a new concept
  • LXD by Canonical [5], etc

containers

docker

  • standard unit of software
  • stand-alone
  • executable
  • lightweight

containers

docker

virtual machine

https://www.docker.com/what-container

docker

  • Linux (CentOS, Debian, etc.)
  • OSX
  • Windows (also Server)
  • AWS, Azure, GC
  • ARM (RaspberryPi) [6]

support

docker

  • MSSQL (on Linux)
  • IIS

windows?

docker

  • https://www.docker.com/get-docker 
  • Community Edition

installing

docker

  • via package manager
  • https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

installing on Linux

docker

  • https://www.docker.com/docker-windows
  • Hyper-V
  • GUI

installing on Windows

docker

  • https://www.docker.com/docker-mac
  • MacOS hypervisor

installing on Mac

docker

  • run a container
  • Docker hub (store)
  • Dockerfile
  • docker build
  • manage running containers

doing stuff

docker

pull

$ docker pull alpine:latest

docker

images

$ docker images
REPOSITORY                           TAG                 IMAGE ID            CREATED             SIZE
alpine                               latest              37eec16f1872        13 hours ago        3.97MB

docker

run

$ docker run -it alpine cat /etc/issue
$ docker run -it alpine /bin/sh

docker

ps

$ docker ps
$ docker ps -a

docker

Dockerfile

FROM alpine:latest

CMD cat /etc/issue

docker

build

$ docker build -t myfirstimage .

docker

https://github.com/codrineugeniu/docker-weather

demo

docker

docker-compose

docker

  • containers are transient

Caveats

docker

  • https://github.com/dockersamples/example-voting-app

further reading

References

  1. https://blog.docker.com/2013/08/paas-present-and-future/
  2. https://martinfowler.com/bliki/PhoenixServer.html
  3. https://martinfowler.com/bliki/ImmutableServer.html
  4. https://www.docker.com/what-docker
  5. https://linuxcontainers.org/lxd/introduction/
  6. https://blog.hypriot.com/getting-started-with-docker-on-your-arm-device/

docker intro

By andreimoustache

docker intro

docker - short intro and demo yay

  • 67