17:02:22 # Life Using podman for most of my local development environment. For my personal/upstream development I started using podman instead of lxc and pbuilder and other toolings. Most projects provide reasonable docker images (such as rust) and I am happier keeping my environment as a whole stable while I can iterate. I have a Dockerfile for the development environment like this:
FROM debian:bookworm RUN apt-get clean && apt-get update && apt-get dist-upgrade -yq && apt-get install -yq \ clang \ make \ && apt-get clean
and have the build scripts invoke podman to build for iteration. Mounting the current directory into the ephemeral environment. I am invoking podman as normal user, to run under user namespace, and this way the build artifacts will be in my uid and that is fine.
$ podman build . -t project-name $ podman run -it --rm -v $(pwd):$(pwd):rw -w $(pwd) project-name \ bash -c "make clean && make -j$(($(nproc) * 2)) -k"
I've written makefile entry to invoke podman as the default entry when I run make, and that seems to suit me when iterating. I have emacs configured to just invoke make when I hit my shortcut key.
invoke-podman: docker-built-stamp podman run -it --rm -v $(shell pwd):$(shell pwd):rw -w $(shell pwd) cxx20 \ bash -c "make -j$(shell nproc) -k all" docker-built-stamp: Dockerfile podman build . -t cxx20 touch docker-built-stamp .PHONY: invoke-podman
The layered file system feels a bit weird and seems like rename is broken in fuse-overlayfs in bullseye. I wish I could use cow-based file systems.
11:37:40 # Life Garbage collecting with podman system prune. Tells me it freed 20GB when it seems to have freed 4GB. Wondering where that discrepancy comes from.