SlideShare a Scribd company logo
martin scharm
dept. for systems biology and bioinformatics
university of rostock
IuK Seminar
Rostock, 2016-05-24
disclaimer
most of the stuff was not made by me. follow the
links to find the actual creators.
paper: https://dx.doi.org/10.6084/m9.figshare.3397576.v1
https://www.oreilly.com/learning/what-is-docker
https://www.oreilly.com/learning/what-is-docker
https://www.docker.com/what-docker
https://www.oreilly.com/learning/what-is-docker
https://en.wikipedia.org/wiki/Docker_(software)
https://www.docker.com/what-docker
https://www.oreilly.com/learning/what-is-docker
https://en.wikipedia.org/wiki/Docker_(software)
https://www.docker.com/what-docker
some kind of virtualisation??
https://www.oreilly.com/learning/what-is-docker
https://en.wikipedia.org/wiki/Docker_(software)
https://www.docker.com/what-docker
some kind of virtualisation??
for sure a booster for your applications,
proposals, presentations… ;-)
http://www.slideshare.net/dotCloud/why-docker
http://www.slideshare.net/dotCloud/why-docker
FROM debian:stable
RUN apt-get install -y curl
RUN apt-get install -y moon-buggy
RUN apt-get install -y sl
imagesconsist
ofread-onlylayers
changesresultin
newlayers
When Docker mounts the rootfs, it starts read-only, as in a traditional Linux boot,
but then, instead of changing the file system to read-write mode, it takes advantage
of a union mount to add a read-write file system over the read-only file system.
In fact there may be multiple read-only file systems stacked on top of each other.
We think of each one of these file systems as a layer.
https://docs.docker.com/v1.6/terms/layer/
FROM debian:stable
RUN apt-get install -y curl
RUN apt-get install -y moon-buggy
RUN apt-get install -y sl
imagesconsist
ofread-onlylayers
changesresultin
newlayers
FROM debian:stable
RUN apt-get install -y curl
RUN apt-get install -y moon-buggy
RUN apt-get install -y sl RUN apt-get install -y nethack-console
FROM debian:stable
RUN apt-get update && apt-get install -y --no-install-recommends curl
RUN apt-get install -y --no-install-recommends moon-buggy
RUN apt-get install -y --no-install-recommends sl
Dockerfile:
docker build
creates an image a different image with
similar “dependencies”
anatomy of a dockerized app
● Dockerfile: receipt do build an image
● Image: runtime environment
● Container: instance of the app
● Volume: persistent data
● Networks: communication
docker hub
● like github for docker images
● pull – push – share your stuff
https://hub.docker.com/
demo time.
get an image from the docker HUB
$ docker pull nginx:latest
latest: Pulling from library/nginx
3059b4820522: Pull complete
ff978d850939: Pull complete
9d1b4547bc10: Pull complete
7bb610d87cee: Pull complete
bbd672577eed: Pull complete
f4a3cc2c46e0: Pull complete
8f9345da4c7a: Pull complete
72cd8a7c892b: Pull complete
Digest: sha256:46a1b05e9ded54272e11b06e13727371a65e2ef8a87f9fb447c64e0607b90340
Status: Downloaded newer image for nginx:latest
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
binfalse/debian-with-curl-moonbuggy-sl latest 125374f94e47 About an hour ago 149.2 MB
nginx latest 72cd8a7c892b 2 weeks ago 182.7 MB
binfalse/skype latest bec4e37e163d 5 weeks ago 565.1 MB
binfalse/deb-skype latest bec4e37e163d 5 weeks ago 565.1 MB
debian stable 82f85996fa28 6 weeks ago 125 MB
run the image
$ docker run --name some-nginx -d -p 2222:80 -v /opt/docker/web:/usr/share/nginx/html:ro -d nginx
ec0771865e5f03a3f55df3611f15f97a88e6eee2c26802f5f95784ed28116222
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ec0771865e5f nginx "nginx -g 'daemon off" 25 seconds ago Up 25 seconds 443/tcp, 0.0.0.0:2222->80/tcp some-nginx
$ curl localhost:2222
...
$ docker kill some-nginx
some-nginx
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ec0771865e5f nginx "nginx -g 'daemon off" 8 minutes ago Exited (137) 7 seconds ago some-nginx
$ docker rm some-nginx
some-nginx
create an image
$ cat Dockerfile
FROM debian:stable
RUN apt-get update && apt-get install -y --no-install-recommends curl
RUN apt-get install -y --no-install-recommends moon-buggy
RUN apt-get install -y --no-install-recommends sl
$ docker build -t binfalse/debian-with-curl-moonbuggy-sl .
Sending build context to Docker daemon 2.048 kB
Step 0 : FROM debian:stable
---> 82f85996fa28
Step 1 : RUN apt-get update && apt-get install -y --no-install-recommends curl
---> Running in 16ce78bf2cfa
Ign http://httpredir.debian.org stable InRelease
Get:1 http://httpredir.debian.org stable-updates InRelease [142 kB]
....
Processing triggers for libc-bin (2.19-18+deb8u4) ...
---> c2566a69a8e2
Removing intermediate container 16ce78bf2cfa
Step 2 : RUN apt-get install -y --no-install-recommends moon-buggy
---> Running in e485857c3881
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
moon-buggy
...
$ docker run --rm -it binfalse/debian-with-curl-moonbuggy-sl /usr/games/sl
that’s just for showcase,
not best practise!
remove an image
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
binfalse/debian-with-curl-moonbuggy-sl latest 711a58dd52d2 18 minutes ago 149.2 MB
nginx latest 72cd8a7c892b 2 weeks ago 182.7 MB
binfalse/skype latest bec4e37e163d 5 weeks ago 565.1 MB
binfalse/deb-skype latest bec4e37e163d 5 weeks ago 565.1 MB
debian stable 82f85996fa28 6 weeks ago 125 MB
$ docker rmi binfalse/debian-with-curl-moonbuggy-sl
Untagged: binfalse/debian-with-curl-moonbuggy-sl:latest
Deleted: 711a58dd52d207421124396061d0f505f1e223ae9803c0d6be601cd510a7c50c
Deleted: 95df58df3f4b320ecc2cff76746a9576658e26136f124992b8fa176b03678341
Deleted: c2566a69a8e2f3f351498cbe3ffe26780b100f3867ce9e2f262b33eed484b640
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
nginx latest 72cd8a7c892b 2 weeks ago 182.7 MB
binfalse/skype latest bec4e37e163d 5 weeks ago 565.1 MB
binfalse/deb-skype latest bec4e37e163d 5 weeks ago 565.1 MB
debian stable 82f85996fa28 6 weeks ago 125 MB
#app1: wordpress + mysql
+ some extra security
MySQL
docker pull mysql:latest
docker run -e MYSQL_ROOT_PASSWORD=yourpassword
--name db -v /home/mysql/:/var/lib/mysql/
-d mysql
# optionally connect to configure the db
alias dockip="docker inspect --format ’{{ .NetworkSettings.IPAddress }}’"
mysql -h$(dockip db) -uroot -pyourpassword
Wordpress
docker pull wordpress:latest
docker run --name my-wordpress --link db:mysql
-v /home/wp/:/var/www/html/ -p 80:80
-d wordpress
benefit: isolation
● host is safe if hacker breaks into wordpress
● plugins won’t be able to see db files
● mysql cannot see wp config etc
#app2: jail for skype
https://binfalse.de/2016/01/04/docker-jail-for-skype/
jail that “obfuscated malicious
binary blob with network capabilities”
$ docker run -d -p 127.0.0.1:55555:22
--name skype_container binfalse/skype
$ ssh -X -p 55555 docker@127.0.0.1
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Jan 4 23:07:37 2016 from 172.17.42.1
$ skype
#app3: teaching
● let’s assume students are asked to c++-code
an std::out for
this is correct
● expected solution:
#include <iostream>
int main()
{
std::cout << "this is correct" << std::endl;
}
#app3: teaching
● tiny bash script to compile && execute the
students’ code: executer.sh
#!/bin/bash
# lets assume the submissions are always found in /job
EXECUTABLE=/job/program.out
SOURCE=/job/program.cpp
# compile it if it wasn’t compiled yet
[ -x $EXECUTABLE ] || g++ -o $EXECUTABLE $SOURCE
# go for it
$EXECUTABLE
#app3: teaching
● create a Dockerfile
● create a docker image
# meta
FROM centos
MAINTAINER martin scharm
# install a c++ compiler
RUN yum install -y gcc-c++
# add the executer script
ADD executer.sh /executer.sh
# makes this a binary
ENTRYPOINT /executer.sh
$ docker build -t binfalse/tutors-little-helper .
Sending build context to Docker daemon 3.072 kB
Step 0 : FROM centos
---> 60e65a8e4030
...
#app3: teaching
● lets say students’ submissions are in
● check submissions using the docker image
$ find /opt/docker/student-submissions/
/opt/docker/student-submissions/1
/opt/docker/student-submissions/1/program.cpp
/opt/docker/student-submissions/2
/opt/docker/student-submissions/2/program.cpp
/opt/docker/student-submissions/3
/opt/docker/student-submissions/3/program.cpp
$ for i in /opt/docker/student-submissions/*
do
echo "checking submission "${i/*//}
docker run --rm -v $i:/job binfalse/tutors-little-helper
done
checking submission 1
this is correct
checking submission 2
this is correct
checking submission 3
this is not correct
submissions 1 & 2 seem to be correct..!?
student #3 is definitely too stupid...
#app3: teaching
● but the hell is that:
$ cat /opt/docker/student-submissions/2/program.cpp
#include <iostream>
#include <fstream>
int main()
{
// do something malicious that the tutors won’t recognize
std::ifstream src("/etc/passwd");
std::ofstream dst("/tmp/newpasswd");
dst << src.rdbuf() <<
"evil:x:1001:1001:Evil User,,,:/home/evil:/bin/bash" <<
std::endl;
// pretend being harmless delivering correct result
std::cout << "this is correct" << std::endl;
}
From http://www.slideshare.net/jpetazzo/introduction-docker-linux-containers-lxc
http://www.slideshare.net/Alshaari/docker-saudi-hpc2016
Passive Benchmarking with docker
LXC, KVM & OpenStack
Hosted @ SoftLayer
Boden Russell (brussell@us.ibm.com)
IBM Global Technology Services
Advanced Cloud Solutions & Innovation
V2.0
Supporting
statistics from
http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
Cloudy Performance: Serial VM Reboot
docker KVM
0
20
40
60
80
100
120
140
2.58
124.43
Average Server Reboot Time
TimeInSeconds
http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
Guest Performance: CPU
Bare Metal docker KVM
0
2
4
6
8
10
12
14
16
18
15.26 15.22 15.13
Calculate Primes Up To 20000
Seconds
http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
Cloudy Performance: Steady State Packing
0.00E+00
1.00E+09
2.00E+09
3.00E+09
4.00E+09
5.00E+09
6.00E+09
7.00E+09
Docker: Compute Node Used Memory (full test duration)
Memory
Time
MemoryUsed
Delta
734 MB
Per VM
49 MB
0.00E+00
1.00E+09
2.00E+09
3.00E+09
4.00E+09
5.00E+09
6.00E+09
7.00E+09
KVM: Compute Node Used Memory (full test duration)
Memory
Time
MemoryUsed
Delta
4387 MB
Per VM
292 MB
http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
Guest Performance: Network
docker KVM
0
100
200
300
400
500
600
700
800
900
1000
940.26 940.56
Network Throughput
ThroughputIn10^6bits/second
http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
take home.
● smaller, more understandable apps – do one thing and
do it well.
● no/weakened dependency hell
● smaller & faster deployment
● +reproducibility
● don’t ignore traditional controls such as high patch level
● docker is not enterprise virtualisation, no cloud platform,
no configuration management, no deployment
framework, no development environment
that’s it.
feel free to come around for discussions
on and off docker and/or a beer.
@binfalse
http://binfalse.de
martin@jabber.lesscomplex.org
questions? doubts? comments?
room 413
ulmencampus
54.086325,12.107683

More Related Content

What's hot

Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
Stein Inge Morisbak
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
Daniel Ku
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
Giacomo Bagnoli
 
A Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web TrafficA Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web Traffic
Philip Tellis
 
Access google command list from the command line
Access google command list from the command lineAccess google command list from the command line
Access google command list from the command line
Ethan Lorance
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
Przemyslaw Koltermann
 
Docker in practice
Docker in practiceDocker in practice
Docker in practice
Jonathan Giannuzzi
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
Ben Hall
 
ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4
Jim Jagielski
 
Serverless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètesServerless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètes
Bertrand Delacretaz
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containers
Ben Hall
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
Dana Luther
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
Heroku
 
“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.
Graham Dumpleton
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains
Docker, Inc.
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container Configuration
Gareth Rushgrove
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - Cascadia
Dana Luther
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
Ben Hall
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
Soshi Nemoto
 
Repoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initializationRepoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initialization
Bertrand Delacretaz
 

What's hot (20)

Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
A Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web TrafficA Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web Traffic
 
Access google command list from the command line
Access google command list from the command lineAccess google command list from the command line
Access google command list from the command line
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Docker in practice
Docker in practiceDocker in practice
Docker in practice
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4
 
Serverless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètesServerless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètes
 
Lessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containersLessons from running potentially malicious code inside Docker containers
Lessons from running potentially malicious code inside Docker containers
 
Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]Converting Your Dev Environment to a Docker Stack - php[world]
Converting Your Dev Environment to a Docker Stack - php[world]
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
 
“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains
 
The Challenges of Container Configuration
The Challenges of Container ConfigurationThe Challenges of Container Configuration
The Challenges of Container Configuration
 
Converting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - CascadiaConverting Your Dev Environment to a Docker Stack - Cascadia
Converting Your Dev Environment to a Docker Stack - Cascadia
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
Repoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initializationRepoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initialization
 

Similar to Docker Demo @ IuK Seminar

Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
Przemyslaw Koltermann
 
Using Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsUsing Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutions
Sander van der Burg
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Ontico
 
Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)
Nicola Paolucci
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
CodeOps Technologies LLP
 
Fat Jar Smackdown
Fat Jar SmackdownFat Jar Smackdown
Fat Jar Smackdown
Red Hat Developers
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
Ganesh Samarthyam
 
Docker command
Docker commandDocker command
Docker command
Eric Ahn
 
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
Amazon Web Services
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration training
Steve Smith
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with Docker
Docker, Inc.
 
Rh developers fat jar smackdown
Rh developers   fat jar smackdownRh developers   fat jar smackdown
Rh developers fat jar smackdown
Red Hat Developers
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
Larry Cai
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
Alper Kanat
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
Alexandre Salomé
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session Docker
LinetsChile
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
Ben Hall
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
CodeOps Technologies LLP
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
Graham Charters
 
Docker for data science
Docker for data scienceDocker for data science
Docker for data science
Calvin Giles
 

Similar to Docker Demo @ IuK Seminar (20)

Docker as an every day work tool
Docker as an every day work toolDocker as an every day work tool
Docker as an every day work tool
 
Using Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsUsing Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutions
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
 
Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Fat Jar Smackdown
Fat Jar SmackdownFat Jar Smackdown
Fat Jar Smackdown
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker command
Docker commandDocker command
Docker command
 
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
AWS re:Invent 2016: Amazon ECR Deep Dive on Image Optimization (CON401)
 
AtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration trainingAtlasCamp 2015 Docker continuous integration training
AtlasCamp 2015 Docker continuous integration training
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with Docker
 
Rh developers fat jar smackdown
Rh developers   fat jar smackdownRh developers   fat jar smackdown
Rh developers fat jar smackdown
 
Learn docker in 90 minutes
Learn docker in 90 minutesLearn docker in 90 minutes
Learn docker in 90 minutes
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session Docker
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
A Hands-on Introduction to Docker
A Hands-on Introduction to DockerA Hands-on Introduction to Docker
A Hands-on Introduction to Docker
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
Docker for data science
Docker for data scienceDocker for data science
Docker for data science
 

More from Martin Scharm

Vertrauen oder Kontrolle? Meine Gesundheitsdaten und ich
Vertrauen oder Kontrolle? Meine Gesundheitsdaten und ichVertrauen oder Kontrolle? Meine Gesundheitsdaten und ich
Vertrauen oder Kontrolle? Meine Gesundheitsdaten und ich
Martin Scharm
 
Improving Reproducibility and Reuse of Modelling Results in the Life Sciences
Improving Reproducibility and Reuse of Modelling Results in the Life SciencesImproving Reproducibility and Reuse of Modelling Results in the Life Sciences
Improving Reproducibility and Reuse of Modelling Results in the Life Sciences
Martin Scharm
 
Model Management in Systems Biology: Challenges – Approaches – Solutions
Model Management in Systems Biology: Challenges – Approaches – SolutionsModel Management in Systems Biology: Challenges – Approaches – Solutions
Model Management in Systems Biology: Challenges – Approaches – Solutions
Martin Scharm
 
COMBINE (archive) meta data
COMBINE (archive) meta dataCOMBINE (archive) meta data
COMBINE (archive) meta data
Martin Scharm
 
Characterising differences between model versions
Characterising differences between model versionsCharacterising differences between model versions
Characterising differences between model versions
Martin Scharm
 
Group meeting in Manchester.
Group meeting in Manchester.Group meeting in Manchester.
Group meeting in Manchester.
Martin Scharm
 
M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...
Martin Scharm
 
M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...
Martin Scharm
 
HandsOn: git (or version control in general...)
HandsOn: git (or version control in general...)HandsOn: git (or version control in general...)
HandsOn: git (or version control in general...)
Martin Scharm
 
The CellML models’ walk through the repository
The CellML models’ walk through the repositoryThe CellML models’ walk through the repository
The CellML models’ walk through the repository
Martin Scharm
 
CombineArchiveWeb -- web based tool to handle files associated with modelling...
CombineArchiveWeb -- web based tool to handle files associated with modelling...CombineArchiveWeb -- web based tool to handle files associated with modelling...
CombineArchiveWeb -- web based tool to handle files associated with modelling...
Martin Scharm
 
Improving the Management of Computational Models -- Invited talk at the EBI
Improving the Management of Computational Models -- Invited talk at the EBIImproving the Management of Computational Models -- Invited talk at the EBI
Improving the Management of Computational Models -- Invited talk at the EBI
Martin Scharm
 
BiVeS & BudHat @ Combine2013 in Paris
BiVeS & BudHat @ Combine2013 in ParisBiVeS & BudHat @ Combine2013 in Paris
BiVeS & BudHat @ Combine2013 in Paris
Martin Scharm
 
BiVeS & BudHat: Invited Talk @ IPK Gatersleben
BiVeS & BudHat: Invited Talk @ IPK GaterslebenBiVeS & BudHat: Invited Talk @ IPK Gatersleben
BiVeS & BudHat: Invited Talk @ IPK Gatersleben
Martin Scharm
 
BiVeS & BudHat @ Harmony2013
BiVeS & BudHat @ Harmony2013BiVeS & BudHat @ Harmony2013
BiVeS & BudHat @ Harmony2013
Martin Scharm
 
BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...
BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...
BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...
Martin Scharm
 

More from Martin Scharm (16)

Vertrauen oder Kontrolle? Meine Gesundheitsdaten und ich
Vertrauen oder Kontrolle? Meine Gesundheitsdaten und ichVertrauen oder Kontrolle? Meine Gesundheitsdaten und ich
Vertrauen oder Kontrolle? Meine Gesundheitsdaten und ich
 
Improving Reproducibility and Reuse of Modelling Results in the Life Sciences
Improving Reproducibility and Reuse of Modelling Results in the Life SciencesImproving Reproducibility and Reuse of Modelling Results in the Life Sciences
Improving Reproducibility and Reuse of Modelling Results in the Life Sciences
 
Model Management in Systems Biology: Challenges – Approaches – Solutions
Model Management in Systems Biology: Challenges – Approaches – SolutionsModel Management in Systems Biology: Challenges – Approaches – Solutions
Model Management in Systems Biology: Challenges – Approaches – Solutions
 
COMBINE (archive) meta data
COMBINE (archive) meta dataCOMBINE (archive) meta data
COMBINE (archive) meta data
 
Characterising differences between model versions
Characterising differences between model versionsCharacterising differences between model versions
Characterising differences between model versions
 
Group meeting in Manchester.
Group meeting in Manchester.Group meeting in Manchester.
Group meeting in Manchester.
 
M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...
 
M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...M2CAT: Extracting reproducible simulation studies from model repositories usi...
M2CAT: Extracting reproducible simulation studies from model repositories usi...
 
HandsOn: git (or version control in general...)
HandsOn: git (or version control in general...)HandsOn: git (or version control in general...)
HandsOn: git (or version control in general...)
 
The CellML models’ walk through the repository
The CellML models’ walk through the repositoryThe CellML models’ walk through the repository
The CellML models’ walk through the repository
 
CombineArchiveWeb -- web based tool to handle files associated with modelling...
CombineArchiveWeb -- web based tool to handle files associated with modelling...CombineArchiveWeb -- web based tool to handle files associated with modelling...
CombineArchiveWeb -- web based tool to handle files associated with modelling...
 
Improving the Management of Computational Models -- Invited talk at the EBI
Improving the Management of Computational Models -- Invited talk at the EBIImproving the Management of Computational Models -- Invited talk at the EBI
Improving the Management of Computational Models -- Invited talk at the EBI
 
BiVeS & BudHat @ Combine2013 in Paris
BiVeS & BudHat @ Combine2013 in ParisBiVeS & BudHat @ Combine2013 in Paris
BiVeS & BudHat @ Combine2013 in Paris
 
BiVeS & BudHat: Invited Talk @ IPK Gatersleben
BiVeS & BudHat: Invited Talk @ IPK GaterslebenBiVeS & BudHat: Invited Talk @ IPK Gatersleben
BiVeS & BudHat: Invited Talk @ IPK Gatersleben
 
BiVeS & BudHat @ Harmony2013
BiVeS & BudHat @ Harmony2013BiVeS & BudHat @ Harmony2013
BiVeS & BudHat @ Harmony2013
 
BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...
BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...
BiVeS & BudHat -- Version Control for Computational Models @ All hands PALs M...
 

Recently uploaded

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

Docker Demo @ IuK Seminar

  • 1. martin scharm dept. for systems biology and bioinformatics university of rostock IuK Seminar Rostock, 2016-05-24
  • 2. disclaimer most of the stuff was not made by me. follow the links to find the actual creators. paper: https://dx.doi.org/10.6084/m9.figshare.3397576.v1
  • 10. FROM debian:stable RUN apt-get install -y curl RUN apt-get install -y moon-buggy RUN apt-get install -y sl imagesconsist ofread-onlylayers changesresultin newlayers When Docker mounts the rootfs, it starts read-only, as in a traditional Linux boot, but then, instead of changing the file system to read-write mode, it takes advantage of a union mount to add a read-write file system over the read-only file system. In fact there may be multiple read-only file systems stacked on top of each other. We think of each one of these file systems as a layer. https://docs.docker.com/v1.6/terms/layer/
  • 11. FROM debian:stable RUN apt-get install -y curl RUN apt-get install -y moon-buggy RUN apt-get install -y sl imagesconsist ofread-onlylayers changesresultin newlayers
  • 12. FROM debian:stable RUN apt-get install -y curl RUN apt-get install -y moon-buggy RUN apt-get install -y sl RUN apt-get install -y nethack-console FROM debian:stable RUN apt-get update && apt-get install -y --no-install-recommends curl RUN apt-get install -y --no-install-recommends moon-buggy RUN apt-get install -y --no-install-recommends sl Dockerfile: docker build creates an image a different image with similar “dependencies”
  • 13. anatomy of a dockerized app ● Dockerfile: receipt do build an image ● Image: runtime environment ● Container: instance of the app ● Volume: persistent data ● Networks: communication
  • 14. docker hub ● like github for docker images ● pull – push – share your stuff https://hub.docker.com/
  • 16. get an image from the docker HUB $ docker pull nginx:latest latest: Pulling from library/nginx 3059b4820522: Pull complete ff978d850939: Pull complete 9d1b4547bc10: Pull complete 7bb610d87cee: Pull complete bbd672577eed: Pull complete f4a3cc2c46e0: Pull complete 8f9345da4c7a: Pull complete 72cd8a7c892b: Pull complete Digest: sha256:46a1b05e9ded54272e11b06e13727371a65e2ef8a87f9fb447c64e0607b90340 Status: Downloaded newer image for nginx:latest $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE binfalse/debian-with-curl-moonbuggy-sl latest 125374f94e47 About an hour ago 149.2 MB nginx latest 72cd8a7c892b 2 weeks ago 182.7 MB binfalse/skype latest bec4e37e163d 5 weeks ago 565.1 MB binfalse/deb-skype latest bec4e37e163d 5 weeks ago 565.1 MB debian stable 82f85996fa28 6 weeks ago 125 MB
  • 17. run the image $ docker run --name some-nginx -d -p 2222:80 -v /opt/docker/web:/usr/share/nginx/html:ro -d nginx ec0771865e5f03a3f55df3611f15f97a88e6eee2c26802f5f95784ed28116222 $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ec0771865e5f nginx "nginx -g 'daemon off" 25 seconds ago Up 25 seconds 443/tcp, 0.0.0.0:2222->80/tcp some-nginx $ curl localhost:2222 ... $ docker kill some-nginx some-nginx $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ec0771865e5f nginx "nginx -g 'daemon off" 8 minutes ago Exited (137) 7 seconds ago some-nginx $ docker rm some-nginx some-nginx
  • 18. create an image $ cat Dockerfile FROM debian:stable RUN apt-get update && apt-get install -y --no-install-recommends curl RUN apt-get install -y --no-install-recommends moon-buggy RUN apt-get install -y --no-install-recommends sl $ docker build -t binfalse/debian-with-curl-moonbuggy-sl . Sending build context to Docker daemon 2.048 kB Step 0 : FROM debian:stable ---> 82f85996fa28 Step 1 : RUN apt-get update && apt-get install -y --no-install-recommends curl ---> Running in 16ce78bf2cfa Ign http://httpredir.debian.org stable InRelease Get:1 http://httpredir.debian.org stable-updates InRelease [142 kB] .... Processing triggers for libc-bin (2.19-18+deb8u4) ... ---> c2566a69a8e2 Removing intermediate container 16ce78bf2cfa Step 2 : RUN apt-get install -y --no-install-recommends moon-buggy ---> Running in e485857c3881 Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: moon-buggy ... $ docker run --rm -it binfalse/debian-with-curl-moonbuggy-sl /usr/games/sl that’s just for showcase, not best practise!
  • 19. remove an image $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE binfalse/debian-with-curl-moonbuggy-sl latest 711a58dd52d2 18 minutes ago 149.2 MB nginx latest 72cd8a7c892b 2 weeks ago 182.7 MB binfalse/skype latest bec4e37e163d 5 weeks ago 565.1 MB binfalse/deb-skype latest bec4e37e163d 5 weeks ago 565.1 MB debian stable 82f85996fa28 6 weeks ago 125 MB $ docker rmi binfalse/debian-with-curl-moonbuggy-sl Untagged: binfalse/debian-with-curl-moonbuggy-sl:latest Deleted: 711a58dd52d207421124396061d0f505f1e223ae9803c0d6be601cd510a7c50c Deleted: 95df58df3f4b320ecc2cff76746a9576658e26136f124992b8fa176b03678341 Deleted: c2566a69a8e2f3f351498cbe3ffe26780b100f3867ce9e2f262b33eed484b640 $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE nginx latest 72cd8a7c892b 2 weeks ago 182.7 MB binfalse/skype latest bec4e37e163d 5 weeks ago 565.1 MB binfalse/deb-skype latest bec4e37e163d 5 weeks ago 565.1 MB debian stable 82f85996fa28 6 weeks ago 125 MB
  • 20. #app1: wordpress + mysql + some extra security MySQL docker pull mysql:latest docker run -e MYSQL_ROOT_PASSWORD=yourpassword --name db -v /home/mysql/:/var/lib/mysql/ -d mysql # optionally connect to configure the db alias dockip="docker inspect --format ’{{ .NetworkSettings.IPAddress }}’" mysql -h$(dockip db) -uroot -pyourpassword Wordpress docker pull wordpress:latest docker run --name my-wordpress --link db:mysql -v /home/wp/:/var/www/html/ -p 80:80 -d wordpress benefit: isolation ● host is safe if hacker breaks into wordpress ● plugins won’t be able to see db files ● mysql cannot see wp config etc
  • 21. #app2: jail for skype https://binfalse.de/2016/01/04/docker-jail-for-skype/ jail that “obfuscated malicious binary blob with network capabilities” $ docker run -d -p 127.0.0.1:55555:22 --name skype_container binfalse/skype $ ssh -X -p 55555 docker@127.0.0.1 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Jan 4 23:07:37 2016 from 172.17.42.1 $ skype
  • 22. #app3: teaching ● let’s assume students are asked to c++-code an std::out for this is correct ● expected solution: #include <iostream> int main() { std::cout << "this is correct" << std::endl; }
  • 23. #app3: teaching ● tiny bash script to compile && execute the students’ code: executer.sh #!/bin/bash # lets assume the submissions are always found in /job EXECUTABLE=/job/program.out SOURCE=/job/program.cpp # compile it if it wasn’t compiled yet [ -x $EXECUTABLE ] || g++ -o $EXECUTABLE $SOURCE # go for it $EXECUTABLE
  • 24. #app3: teaching ● create a Dockerfile ● create a docker image # meta FROM centos MAINTAINER martin scharm # install a c++ compiler RUN yum install -y gcc-c++ # add the executer script ADD executer.sh /executer.sh # makes this a binary ENTRYPOINT /executer.sh $ docker build -t binfalse/tutors-little-helper . Sending build context to Docker daemon 3.072 kB Step 0 : FROM centos ---> 60e65a8e4030 ...
  • 25. #app3: teaching ● lets say students’ submissions are in ● check submissions using the docker image $ find /opt/docker/student-submissions/ /opt/docker/student-submissions/1 /opt/docker/student-submissions/1/program.cpp /opt/docker/student-submissions/2 /opt/docker/student-submissions/2/program.cpp /opt/docker/student-submissions/3 /opt/docker/student-submissions/3/program.cpp $ for i in /opt/docker/student-submissions/* do echo "checking submission "${i/*//} docker run --rm -v $i:/job binfalse/tutors-little-helper done checking submission 1 this is correct checking submission 2 this is correct checking submission 3 this is not correct submissions 1 & 2 seem to be correct..!? student #3 is definitely too stupid...
  • 26. #app3: teaching ● but the hell is that: $ cat /opt/docker/student-submissions/2/program.cpp #include <iostream> #include <fstream> int main() { // do something malicious that the tutors won’t recognize std::ifstream src("/etc/passwd"); std::ofstream dst("/tmp/newpasswd"); dst << src.rdbuf() << "evil:x:1001:1001:Evil User,,,:/home/evil:/bin/bash" << std::endl; // pretend being harmless delivering correct result std::cout << "this is correct" << std::endl; }
  • 29. Passive Benchmarking with docker LXC, KVM & OpenStack Hosted @ SoftLayer Boden Russell (brussell@us.ibm.com) IBM Global Technology Services Advanced Cloud Solutions & Innovation V2.0 Supporting statistics from http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
  • 30. Cloudy Performance: Serial VM Reboot docker KVM 0 20 40 60 80 100 120 140 2.58 124.43 Average Server Reboot Time TimeInSeconds http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
  • 31. Guest Performance: CPU Bare Metal docker KVM 0 2 4 6 8 10 12 14 16 18 15.26 15.22 15.13 Calculate Primes Up To 20000 Seconds http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
  • 32. Cloudy Performance: Steady State Packing 0.00E+00 1.00E+09 2.00E+09 3.00E+09 4.00E+09 5.00E+09 6.00E+09 7.00E+09 Docker: Compute Node Used Memory (full test duration) Memory Time MemoryUsed Delta 734 MB Per VM 49 MB 0.00E+00 1.00E+09 2.00E+09 3.00E+09 4.00E+09 5.00E+09 6.00E+09 7.00E+09 KVM: Compute Node Used Memory (full test duration) Memory Time MemoryUsed Delta 4387 MB Per VM 292 MB http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
  • 33. Guest Performance: Network docker KVM 0 100 200 300 400 500 600 700 800 900 1000 940.26 940.56 Network Throughput ThroughputIn10^6bits/second http://www.slideshare.net/BodenRussell/kvm-and-docker-lxc-benchmarking-with-openstack/
  • 34. take home. ● smaller, more understandable apps – do one thing and do it well. ● no/weakened dependency hell ● smaller & faster deployment ● +reproducibility ● don’t ignore traditional controls such as high patch level ● docker is not enterprise virtualisation, no cloud platform, no configuration management, no deployment framework, no development environment
  • 35. that’s it. feel free to come around for discussions on and off docker and/or a beer. @binfalse http://binfalse.de martin@jabber.lesscomplex.org questions? doubts? comments? room 413 ulmencampus 54.086325,12.107683