Skip to content

Commit 6ddbd01

Browse files
committed
test: Fix Dockerfile ARG issue
Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent b0ea746 commit 6ddbd01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ LABEL bootc.testimage="1"
3030
FROM base as buildroot
3131
# Flip this off to disable initramfs code
3232
ARG initramfs=1
33-
# Version for RPM build (optional, computed from git in Justfile)
34-
ARG pkgversion=
3533
# This installs our buildroot, and we want to cache it independently of the rest.
3634
# Basically we don't want changing a .rs file to blow out the cache of packages.
3735
RUN --mount=type=bind,from=packaging,target=/run/packaging /run/packaging/install-buildroot
@@ -44,6 +42,8 @@ WORKDIR /src
4442
RUN --mount=type=cache,target=/src/target --mount=type=cache,target=/var/roothome cargo fetch
4543

4644
FROM buildroot as build
45+
# Version for RPM build (optional, computed from git in Justfile)
46+
ARG pkgversion
4747
# Build RPM directly from source, using cached target directory
4848
RUN --mount=type=cache,target=/src/target --mount=type=cache,target=/var/roothome --network=none RPM_VERSION="${pkgversion}" /src/contrib/packaging/build-rpm
4949

@@ -64,7 +64,7 @@ FROM base
6464
ARG variant
6565
RUN --mount=type=bind,from=packaging,target=/run/packaging /run/packaging/configure-variant "${variant}"
6666
# Support overriding the rootfs at build time conveniently
67-
ARG rootfs=
67+
ARG rootfs
6868
RUN --mount=type=bind,from=packaging,target=/run/packaging /run/packaging/configure-rootfs "${variant}" "${rootfs}"
6969
# Inject additional content
7070
COPY --from=packaging /usr-extras/ /usr/

0 commit comments

Comments
 (0)