@mariolet github.com/l0rd
@mariolet github.com/l0rd
Copy SourcesMount SourcesDockerize Your ToolsONBUILD ImageDependencies First DockerfileSource 2 ImageBuild From ScratchContainers LauncherMount SourcesDocker Socket MountContainers LauncherBuild From ScratchHost SpoofingENTRYPOINT and CMD combinedExec Form ENTRYPOINTSource 2 ImageSidecar ContainerAmbassador Container@mariolet github.com/l0rd
@mariolet github.com/l0rd
Docker Image
2048
Source code
https://github/l0rd/containerspatterns/MS/
Run command
docker run -p 8080:80 \ -v $(pwd):/usr/local/apache2/htdocs/ \ httpd
@mariolet github.com/l0rd
Docker Image
maven:3.3.3-jdk-8
Source code
https://github/l0rd/containerspatterns/DYT
Run command
# Make the alias of the dockerized toolalias mvn="docker run \ -v $(pwd):/usr/src \ -v ~/.m2:/root/.m2 \ -w /usr/src \ maven:3.3.3-jdk-8 \ mvn"# Run the toolmvn -version
alias command can be used to make it easier to run@mariolet github.com/l0rd
docker runDocker Image
containerslanguages/rust-launcher
Source code
https://github/l0rd/containerspatterns/CL
Run command
docker run -v $(pwd):/src/ \ -v /var/run/docker.sock:/var/run/docker.sock \ containerslanguages/rust-launcher
@mariolet github.com/l0rd
Docker Image
alpine
Source code
https://github/l0rd/containerspatterns/HS
Run command
docker run --net=host \ -v /:/hostfs/ \ --pid=host \ --uts=host \ --ipc=host \ -v $(pwd):/src/ \ alpine sh -c ". /src/print_host_info.sh"
@mariolet github.com/l0rd
Docker Images
Source code
https://github/l0rd/containerspatterns/S2I
Build command
docker build -t s2i .
Run command
docker run -t --rm s2i
@mariolet github.com/l0rd
Docker Images httpd and ubuntu
Source code
https://github/l0rd/containerspatterns/SC
Run command
# Run apache httpd in the backgroundcid=$(docker run -dit -p 8080:80 \ -v /usr/local/apache2/htdocs/ httpd:2.4)# Run a sidecar container that updates index.htmldocker run --volumes-from ${cid} -ti --rm ubuntu \sh -c "echo I am the sidecar >> /usr/local/apache2/htdocs/index.html"# Run a sidecar container that shares the same PID namespacedocker run --pid=container:${cid} -ti --rm ubuntu \ bash -c "echo -n pid 1 is \$(ps -p 1 -o comm=), killing it...; kill 1; echo done."
@mariolet github.com/l0rd
@mariolet github.com/l0rd
A development pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
Docker Image
2048
Source code
https://github/l0rd/containerspatterns/CS/
Build and run commands
docker build -t 2048 .docker run -d -p 8080:80 2048
In this pattern it's particularly important to separate in 2 distinct steps:
@mariolet github.com/l0rd
A development pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
alias command can be used to make it easier to run@hguemar, @mariolet, @mjbright
Docker Image
maven:3.3.3-jdk-8
Source code
https://github/l0rd/containerspatterns/DYT
Run command
# Make the alias of the dockerized toolalias mvn="docker run \ -v $(pwd):/usr/src \ -v ~/.m2:/root/.m2 \ -w /usr/src \ maven:3.3.3-jdk-8 \ mvn"# Run the toolmvn -version
@mariolet github.com/l0rd
A runtime pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
Docker Image
containerslanguages/golang
Source code
https://github/l0rd/containerspatterns/DSM
Run command
docker run -v /var/run/docker.sock:/var/run/docker.sock \ containerslanguages/golang
@mariolet github.com/l0rd
A Distribution and runtime pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
Scratch@hguemar, @mariolet, @mjbright
Docker Image
emilevauge/tictac
Source code
https://github/emilevauge/tictac/
Run command
docker build -t tictac .# Compare tictac binary size with tictac docker image size
@mariolet github.com/l0rd
A runtime pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
Docker Image
ecc
Source code
https://github/l0rd/containerspatterns/ECC
Run command
docker run -ti --rm eccdocker run -ti --rm ecc -f lean docker
@mariolet github.com/l0rd
A runtime pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
/bin/sh -c on Linux or cmd /S /C on Windows)@hguemar, @mariolet, @mjbright
Exec and Shell form compared Docker Image
httpd
Source code
https://github/l0rd/containerspatterns/EFE/
Build and Run commands
docker build -t httpd-exec -f Dockerfile.exec .docker build -t httpd-shell -f Dockerfile.shell .docker run -i -P --rm httpd-exec# Stop it using ^Cdocker run -i -P --rm httpd-shell# (Try to) stop it using ^C
@mariolet github.com/l0rd
A development pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
Docker Image
obi-java
Source code
https://github/l0rd/containerspatterns/OBI
Build/Run commands
docker build -t obi-java .docker run --rm obi-java
@mariolet github.com/l0rd
A development pattern
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
@hguemar, @mariolet, @mjbright
Docker Image dfd
Source code
https://github/l0rd/containerspatterns/dfd
https://github/polyfunc/flask-todolist
Build command
docker build -t dfd .docker build -t dfd-orig -f Dockerfile.orig .touch onefiledocker build -t dfd .docker build -t dfd-orig -f Dockerfile.orig .
Keyboard shortcuts
| ↑, ←, Pg Up, k | Go to previous slide |
| ↓, →, Pg Dn, Space, j | Go to next slide |
| Home | Go to first slide |
| End | Go to last slide |
| Number + Return | Go to specific slide |
| b / m / f | Toggle blackout / mirrored / fullscreen mode |
| c | Clone slideshow |
| p | Toggle presenter mode |
| t | Restart the presentation timer |
| ?, h | Toggle this help |
| Esc | Back to slideshow |