podman

Table of Contents

1. Usage

1.1. Creating a tar image dump

This can be useful for inspection

podman save --output alpine.tar --format=oci-archive alpine:3.17.1

2. Dockerfile tips

2.1. Add user

  • Don't run as root inside container
  • user id is set by you so builds will be reproducible
RUN groupadd --gid 9999 appuser && \
useradd --system --uid 9999 -g appuser --create-home appuser
WORKDIR /home/appuser
USER appuser

2.2. FROM should be absolute

FROM python:3.7.3-alpine3.9
instead of
FROM python:3

Created: 2024-07-16 Tue 16:44

Validate