Mathieu Bacou
mathieu.bacou@telecom-sudparis.eu
Télécom SudParis, IMT, IP Paris, Inria
2024–2025 CSC5004 — Cloud Computing Infrastructures
Operating system-level virtualization | Hardware virtualization | |
---|---|---|
Security | - | + |
Usability | ++ | - |
Performance | 0 | 0 |
Startup time | + | - - |
Image size | + | - - |
Memory overhead | + | - - |
docker commit
tags the current state of the container
as an image# Starting from a base image.
FROM alpine
# Execute commands to build and configure the image.
RUN apk add --no-cache perl
# Add local files.
COPY cowsay /usr/local/bin/cowsay
COPY docker.cow /usr/local/share/cows/default.cow
# Set the default executable.
ENTRYPOINT ["/usr/local/bin/cowsay"]
docker build --tag namespace/name:tag
FROM scratch
mnt
: mount points
pid
: hierarchy of processes
net
: networking facilities
ipc
: interprocess communication
time
: date and timeuser
: users, groups and privileges
uts
: hostname and domain name
cgroup
: control groups (see next)cpu
: CPU timecpuset
: task placement on memory and CPU nodesmemory
: memory usageio
: block I/Opid
: number of PIDs (i.e., of processes)device
: access to device files
perf_event
: performance monitoringnet
: network packets priority and classes for QoSrdma
,
hugetlb
, misc
CAP_XXX
):SYS_NICE
: change process nicenessSYS_ADMIN
: system admin (mount…)SYS_CHROOT
: change root path of processSYS_MODULE
: (un)load kernel modulesSETGID/UID
: change process GIDs/UIDsKILL
: send signalsNET_ADMIN
: network adminNET_RAW
: use RAW socketsCHOWN
: change ownermnt
namespace to isolate hierarchychroot
to isolate the process to a subtreedocker image history $IMAGE_NAME
deployment.yaml
kind: Deployment
# [...]
spec:
# Scalability: set number of replicas.
replicas: 3
selector:
matchLabels:
app: simpleserver
template:
metadata:
labels:
app: simpleserver
spec:
# Pod: composition of containers.
containers:
- name: pythonserver
image: python:simpleserver
resources:
requests:
cpu: 0.5
ports:
- containerPort: 8080