From 36f8cdf91b909bc9334a7afa63a969d6a8b9ce68 Mon Sep 17 00:00:00 2001 From: Adrian Freund Date: Thu, 31 Oct 2024 16:54:35 +0100 Subject: Fix dockerfile not cross compiling correctly (#5294) --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index b6723a01..f118b61d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,6 @@ -ARG CREATED -ARG REVISION -ARG TARGETPLATFORM - FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx FROM --platform=$BUILDPLATFORM rust:alpine AS build + COPY --from=xx / / RUN apk add --no-cache clang lld @@ -15,6 +12,8 @@ RUN --mount=type=cache,target=/root/.cargo/git/db \ CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \ cargo fetch +ARG TARGETPLATFORM + RUN xx-apk add --no-cache musl-dev openssl-dev openssl-libs-static RUN --mount=type=cache,target=/root/.cargo/git/db \ --mount=type=cache,target=/root/.cargo/registry/cache \ @@ -26,6 +25,8 @@ RUN --mount=type=cache,target=/root/.cargo/git/db \ xx-verify target/release/typst FROM alpine:latest +ARG CREATED +ARG REVISION LABEL org.opencontainers.image.authors="The Typst Project Developers " LABEL org.opencontainers.image.created=${CREATED} LABEL org.opencontainers.image.description="A markup-based typesetting system" -- cgit v1.2.3