Buildah "error building at STEP" in CI
buildah bud (build-using-dockerfile) prints "STEP n/N" as it runs each instruction. "error building at STEP" names the exact instruction that failed; the surrounding output holds the real cause, usually a failing RUN command or a missing COPY source.
What this error means
buildah bud stops with "error building at STEP \"RUN ...\": error while running runtime: exit status 1" or a COPY that cannot find its source.
STEP 5/9: RUN apt-get update && apt-get install -y libpq-dev
...
error building at STEP "RUN apt-get update && apt-get install -y libpq-dev":
error while running runtime: exit status 100Common causes
A RUN command exits non-zero
The named STEP is a RUN whose command failed (a package not found, a script error), so the build aborts at that instruction.
A COPY/ADD source is missing from the context
The STEP is a COPY whose source path is not in the build context, mirroring a daemon build failure.
How to fix it
Read the STEP and fix that instruction
- Note the STEP number and the instruction text in the error.
- For a RUN, reproduce the command and fix the underlying failure (package name, network, exit code).
- For a COPY, confirm the source exists in the context you passed to buildah bud.
buildah bud -t app:latest -f Dockerfile .Isolate the failing RUN
Split a compound RUN so the failing command is obvious, then address that specific cause.
How to prevent it
- Keep RUN commands small so a failing STEP is easy to pinpoint.
- Confirm COPY sources exist in the build context.
- Pin package versions so a RUN install does not break unexpectedly.