Podifing Your Docker Container: Marc Skinner Principal Solutions Architect
Podifing Your Docker Container: Marc Skinner Principal Solutions Architect
Marc Skinner
Principal Solutions Architect
1
Containers
RED HAT ENTERPRISE LINUX CONTAINER TOOLING
2
RHEL CONTAINERS
Build
Run
Application dependencies
CONTAINERS
SELinux
Seccomp
Cgroups
Namespaces
3
RHEL CONTAINERS
4
Container Tooling Overview
RED HAT ENTERPRISE LINUX CONTAINER TOOLING
5
RHEL CONTAINERS
6
RHEL CONTAINERS
Application layer
More control
Scriptable tooling for fine-grained
Java™ runtime layer
image control, and maximum control
starting from base or scratch images
OS update layer
Java runtime and Minimization of images
Base Red Hat dependencies, and Elimination of unneeded dependencies
Enterprise Linux application by using host-based tools
7
RHEL CONTAINERS
Host
8
Container Tooling Details
RED HAT ENTERPRISE LINUX CONTAINER TOOLING
9
RHEL CONTAINERS
Wait, no Docker?
● Docker and the Docker daemon are not ● No single point of failure
needed ● No more orphaned processes if daemon
● Podman is a replacement fails
● We move from a centralized Docker ● Ability to run / build containers as
daemon to a process runtime unprivileged users
● Client/Server vs Fork/Exec model
10
RHEL CONTAINERS
11
RHEL CONTAINERS
12
RHEL CONTAINERS
13
RHEL CONTAINERS
14
RHEL CONTAINERS
15
RHEL CONTAINERS
16
RHEL CONTAINERS
How small are micro and minimal? Can we get under 100MB?
ubi8/ubi-micro ubi8/ubi-minimal
● Smallest possible UBI image ● Designed for applications that contain
● No package manager their own dependencies (python, node.js,
.NET, etc.)
● Must use buildha or external
● Minimized pre-installed content
mechanism to update/add content
● microdnf - Minimal package manager
(install, update, and remove)
● No suid binaries
17
RHEL CONTAINERS
ubi8/ubi ubi8/ubi-init
● Also called Platform ● Known as Multi-Service
● Use for any application that runs on ● Eases the ability to run multiple services
RHEL from a single container
● Unified, OpenSSL crypto stack ● Based on the ubi8/ubi image
● Full YUM stack ● Configured to run systemd on start
● Includes useful basic OS tooling (tar, ● Allows you to enable services at build
gzip, vi, etc.) time
18
RHEL CONTAINERS
●
ubi8/ubi-micro : 39.1 MB
●
ubi8/ubi-minimal : 105 MB
●
ubi8/ubi : 234 MB
●
ubi8/ubi-init : 251 MB
19
RHEL CONTAINERS
20
RHEL CONTAINERS
https://catalog.redhat.com/software/containers/explore
21
RHEL CONTAINERS
23
RHEL CONTAINERS
:s/docker/podman/
25
RHEL CONTAINERS
26
RHEL CONTAINERS
Running Information
29
RHEL CONTAINERS
● Pass variables
# podman run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d
mcr.microsoft.com/mssql/rhel/server:2019-latest
30
RHEL CONTAINERS
Clean up
# podman volume ls
# podman volume rm VOLUME_ID
# podman system prune --all --force
# podman stop --all
# podman rmi --all --force
31
Thank you linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
Red Hat is the world’s leading provider of enterprise
32