Process similaire à Docker. Il faut d’abord écrire un Dockerfile puis compiler l’image.
- Ecriture du fichier Dockerfile
FROM python:alpine
WORKDIR /usr/src/app
RUN apk update
RUN apk add git rsync hugo
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY runner.py .
CMD [ "python", "runner.py" ]
- Génération de l’image podman
podman build --tag python3-alpine:runner -f ./Dockerfile