Prepare for multi-platform build

This commit is contained in:
Jordan Webb 2021-02-02 01:18:12 -06:00
parent ad021ce3e0
commit 55643affd4
No known key found for this signature in database
GPG Key ID: C341950C47B6CE14

View File

@ -5,15 +5,15 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends unzip apt-get install -y --no-install-recommends unzip
# Set the flavour arg to the string you got in Detecting flavour section. # docker buildx will fill these in
# For example if the flavour is `amd64` the command will be ARG TARGETARCH=amd64
ARG FLAVOUR=amd64 ARG TARGETVARIANT=
# Clone the release build into a temporary directory and unpack it # Clone the release build into a temporary directory and unpack it
# We use ADD here to bust the cache if the pleroma release changes # We use ADD here to bust the cache if the pleroma release changes
# We use a separate layer for extraction so we don't end up with junk # We use a separate layer for extraction so we don't end up with junk
# from ADD left over in the final image. # from ADD left over in the final image.
ADD https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=${FLAVOUR} /tmp/pleroma.zip ADD https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=${TARGETARCH}${TARGETVARIANT:+${TARGETVARIANT}l} /tmp/pleroma.zip
RUN mkdir -p /opt/pleroma && \ RUN mkdir -p /opt/pleroma && \
unzip /tmp/pleroma.zip -d /tmp/ && \ unzip /tmp/pleroma.zip -d /tmp/ && \