@@ -19,6 +19,7 @@ yamllint -v && yamllint -s -f colored .
1919# =========================================================
2020FROM golang:1.26.5-alpine AS imager-build
2121SHELL ["/bin/ash" , "-euxo" , "pipefail" , "-c" ]
22+ RUN apk add --no-cache binutils
2223WORKDIR /go/src
2324COPY imager/go.mod imager/go.sum ./
2425RUN go mod download
@@ -34,11 +35,11 @@ FROM alpine:3.24.1 AS alpine-base
3435
3536# =========================================================
3637FROM alpine-base AS imager
37- # TODO: bundle objcopy (or use a golang lib) and systemd-efistub into the imager binary
38- RUN apk add --no-cache binutils systemd-efistub
39- COPY --from=imager-build /go/bin/imager /bin/imager
38+ # TODO: bundle systemd-efistub into the imager binary
39+ RUN apk add --no-cache systemd-efistub
40+ COPY --from=imager-build /go/bin/imager /usr/ bin/imager
4041WORKDIR /out
41- ENTRYPOINT ["/bin/imager" ]
42+ ENTRYPOINT ["/usr/ bin/imager" ]
4243
4344# =========================================================
4445FROM alpine-base AS bootable-alpine
@@ -94,12 +95,12 @@ if [ "$UCODE" != "none" ]; then apk add --no-cache "${UCODE}-ucode"; fi;
9495# hadolint ignore=DL3006
9596FROM imager AS test
9697ARG FORMAT=efi
97- RUN --mount=from=test-rootfs,target=/system /bin/ imager --format "$FORMAT"
98+ RUN --mount=from=test-rootfs,target=/system imager --format "$FORMAT"
9899
99100# =========================================================
100101# Generate a qemu image running our custom OS image
101102FROM alpine-base AS emulator
102- RUN apk add --no-cache bash qemu-system-x86_64 ovmf
103+ RUN apk add --no-cache bash qemu-system-x86_64 ovmf binutils
103104COPY emulator.sh /entrypoint
104105COPY --from=test /out /images
105106ARG FORMAT
0 commit comments