The Zerofox Syndicate
Update: turns out, all I needed was
--layers flag. If you use
buildah bud --layers it acts the same as
docker build command. It is also possible to set
the environment variable
BUILDAH_LAYERS=true to override the default
behaviour. You can ignore the rest of this article.
I’ve been using podman and buildah for a while but rebuilds simply take too long. I was recently creating a Dockerfile for the IRC server ngircd. This image typically starts of with downloading a bunch of dependencies.
FROM docker.io/library/debian:bullseye-slim as ngircdbuilder RUN apt-get update && apt-get install -y \ autoconf automake build-essential expect libgnutls28-dev \ libident-dev libpam-dev pkg-config libwrap0-dev libz-dev telnet
Followed by downloading and building of the ngircd source.
WORKDIR /src ADD https://github.com/ngircd/ngircd/releases/download/rel-24/ngircd-24.tar.gz /src RUN tar -xvzf ngircd-24.tar.gz && \ cd ngircd-24 chmod +x autogen.sh configure && \ mkdir /opt/ngircd && \ ./configure --prefix=/opt/ngircd \ && make && make install
Each time I run
buildah build-using-dockerfile or
buildah bud, I will have
to wait for 10 minutes. Buildah will execute the installation of the build
dependencies and compiling steps each time. Docker on the other hand will skip
the installation of the build dependencies during a rebuild. It will download
the tarball, only to verify that it is still the same file and skip ahead. This
whole process only takes a few seconds, making rebuilds for small Dockerfile
No matter how much I like running rootless containers with podman. These rebuilds simply eat too much of my time. Until I’ve got a solution for these rebuild times I’m sticking with Docker.Tags: containers