diff --git a/docker/Dockerfile b/docker/Dockerfile index 4839f319f6e0a68aef600ff935c4d7a3496aebb7..3553f19723c592e18bb0f7044c19836ce2799853 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,3 +1,6 @@ +# Workaround for https://github.com/containers/buildah/issues/4742 +FROM debian:bullseye-slim as target + # ------------------------------------------------------------------------------ # Build Stage # ------------------------------------------------------------------------------ @@ -8,10 +11,15 @@ FROM --platform=$BUILDPLATFORM rust:1-bullseye as build ARG BUILDPLATFORM ARG TARGETPLATFORM +# Debug +RUN echo "BUILDPLATFORM = $BUILDPLATFORM" +RUN echo "TARGETPLATFORM = $TARGETPLATFORM" + # We need the target arch triplet in both Debian and rust flavor RUN echo "DEBIAN_ARCH_TRIPLET='$(dpkg-architecture -A${TARGETPLATFORM#linux/} -qDEB_TARGET_MULTIARCH)'" >>/root/dynenv RUN . /root/dynenv && \ echo "RUST_ARCH_TRIPLET='$(echo "$DEBIAN_ARCH_TRIPLET" | sed -E 's/-linux-/-unknown&/')'" >>/root/dynenv +RUN cat /root/dynenv WORKDIR /root @@ -65,7 +73,7 @@ RUN if [ "$cucumber" != 0 ] && [ "$TARGETPLATFORM" = "$BUILDPLATFORM" ]; then \ # Final Stage # ------------------------------------------------------------------------------ -FROM debian:bullseye-slim +FROM target LABEL maintainer="Gilles Filippini <gilles.filippini@pini.fr>" LABEL version="0.0.0" @@ -88,5 +96,9 @@ USER duniter # Intall COPY --from=build /root/build /usr/local/bin/ +COPY --from=build /root/dynenv /var/lib/duniter COPY docker/docker-entrypoint /usr/local/bin/ COPY docker/docker-distance-entrypoint /usr/local/bin/ + +# Debug +RUN cat /var/lib/duniter/dynenv