mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 12:10:17 +00:00
Bumps the docker-updates group with 1 update: rustlang/rust. Updates `rustlang/rust` from `7cba2ed` to `3453212` --- updated-dependencies: - dependency-name: rustlang/rust dependency-version: nightly-alpine dependency-type: direct:production dependency-group: docker-updates ... Signed-off-by: dependabot[bot] <support@github.com>
26 lines
1.2 KiB
Docker
26 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:1.7-labs
|
|
ARG RUST_PROFILE=release
|
|
ARG RUST_TARGET_SUBDIR=release
|
|
|
|
FROM --platform=$BUILDPLATFORM rustlang/rust:nightly-alpine@sha256:34532121803db17008af0cdc4e2e1210466cb257cc9d3840dac42d706640fee5 AS build
|
|
RUN apk --no-cache add musl-dev busybox-static
|
|
ARG RUST_PROFILE
|
|
RUN adduser -S -s /bin/sh build
|
|
COPY \
|
|
--exclude=rust-toolchain.toml \
|
|
--exclude=hack \
|
|
--chown=build:build \
|
|
. /build
|
|
WORKDIR /build
|
|
ARG TARGETPLATFORM
|
|
ARG RUST_TARGET_SUBDIR
|
|
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ] || [ "${TARGETPLATFORM}" = "linux/x86_64" ]; then \
|
|
rustup target add x86_64-unknown-uefi; cargo build --bin sprout --profile "${RUST_PROFILE}" --target x86_64-unknown-uefi && \
|
|
cp "target/x86_64-unknown-uefi/${RUST_TARGET_SUBDIR}/sprout.efi" /sprout.efi; fi
|
|
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ] || [ "${TARGETPLATFORM}" = "linux/aarch64" ]; then \
|
|
rustup target add aarch64-unknown-uefi; cargo build --bin sprout --profile "${RUST_PROFILE}" --target aarch64-unknown-uefi && \
|
|
cp "target/aarch64-unknown-uefi/${RUST_TARGET_SUBDIR}/sprout.efi" /sprout.efi; fi
|
|
|
|
FROM scratch AS final
|
|
COPY --from=build /sprout.efi /sprout.efi
|