fix: multi-platform build

Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
This commit is contained in:
Jesús Fernández 2025-02-03 14:21:15 +01:00
parent 4a089e49cb
commit f3b27c73d5
No known key found for this signature in database
GPG Key ID: F009C46F547D9A66
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
# It's important that this is Debian 12 to match the distroless image.
FROM debian:12-slim AS build
FROM --platform=${BUILDPLATFORM} debian:12-slim AS build
RUN --mount=type=cache,target=/var/lib/apt/lists \
--mount=type=cache,target=/var/cache/apt \
@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
# Copy the function venv to our runtime stage. It's important that the path be
# the same as in the build stage, to avoid shebang paths and symlinks breaking.
FROM gcr.io/distroless/python3-debian12 AS image
FROM --platform=${BUILDPLATFORM} gcr.io/distroless/python3-debian12 AS image
WORKDIR /
COPY --from=build /venv/fn /venv/fn
EXPOSE 9443