You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[1/2] STEP 1/3: FROM alpine:latest AS build
[1/2] STEP 2/3: RUN echo foo >bar
[1/2] STEP 3/3: ARG image_release
Error: determining starting point for build: no FROM statement found
buildah --version
buildah version 1.37.5 (image-spec 1.1.0, runtime-spec 1.2.0)
The text was updated successfully, but these errors were encountered:
FROM instructions can only reference args declared in the header of the file, i.e., the part of the file before the first FROM.
Despite appearances from the use of whitespace in the quoted example, the ARG image_release line is treated as part of the first stage.
Move the ARG image_release line to be just after the ARG image_build line (before FROM $image_build as build) , and you should be all set.
Trying to set the base image name using a build argument fails in 1.37.5 for multi stage builds.
With buildah 1.33.6 this works as expected.
Example
buildah bud --build-arg image_build=alpine:latest --build-arg image_release=alpine:3.20.3
The text was updated successfully, but these errors were encountered: