Docker 101
-
Doctoral Researcher @ Institute for Internet Security
- Research Group Lead Blockchain
- Consultant @ Styrascosoft GbR
- Testcontainers Maintainer and Open Source Enthusiast
- Oracle Groundbreaker Ambassador
- Gitkraken Ambassador
- Organizer Software Craftsmanship Meetup Ruhr
Kevin Wittek @kiview
Why Containers?
- Development
- Deployment
- Operations
- Playing
What are Containers?
Container vs VM
Container + VM = <3
Kernel Space vs User Space
https://rhelblog.redhat.com/2015/07/29/architecting-containers-part-1-user-space-vs-kernel-space/
Container System Calls
https://rhelblog.redhat.com/2015/07/29/architecting-containers-part-1-user-space-vs-kernel-space/
Kernel Subsystems
https://rhelblog.redhat.com/2015/07/29/architecting-containers-part-1-user-space-vs-kernel-space/
VM vs Containers reloaded
https://rhelblog.redhat.com/2015/07/29/architecting-containers-part-1-user-space-vs-kernel-space/
Kernel Namespaces
https://rhelblog.redhat.com/2015/07/29/architecting-containers-part-1-user-space-vs-kernel-space/
Namespaces in Action
https://rhelblog.redhat.com/2015/07/29/architecting-containers-part-1-user-space-vs-kernel-space/
Docker Architecture
Layered Filesystem
Volumes & Mounts
docker container run -ti -v /home/myuser:/home/dockeruser:ro ubuntu:latest
docker container run -v postgres_data:/var/lib/postgresql/data postgres
docker volume ls
docker volume inspect postgres_data
Docker Networking
(Bridge)
Docker-Compose
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
db_data: {}
Docker Swarm Mode
Portainer
docker run -d \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer
Let's get hacking!
https://training.play-with-docker.com/ops-s1-hello/
https://training.play-with-docker.com/beginner-linux/
Docker 101
By Kevin Wittek
Docker 101
- 1,414