From a760df23a752f904222e5a9f2ed2b0cee99bd7b6 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 9 May 2023 23:51:44 +0200 Subject: [PATCH] Fix compile not working due to different folders --- tools/synapse-compress-state/Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/synapse-compress-state/Dockerfile b/tools/synapse-compress-state/Dockerfile index 583b7ba..765a6b4 100644 --- a/tools/synapse-compress-state/Dockerfile +++ b/tools/synapse-compress-state/Dockerfile @@ -13,14 +13,20 @@ RUN apk add python3 musl-dev pkgconfig openssl-dev make ENV RUSTFLAGS="-C target-feature=-crt-static" # Copy sources ADD .build/repository/ . + +FROM build AS build-synapse_compress-state # Update dependencies and Compile RUN cargo update && cargo build --release +FROM build AS build-synapse_auto_compressor +# Update dependencies and Compile +RUN cd synapse_auto_compressor/ && cargo update && cargo build --release + # ---- Release ---- FROM base AS release -# Copy build-target -COPY --from=build /build/target/release/synapse_compress_state . -COPY --from=build /build/target/release/synapse_auto_compressor . +## Copy build-target +COPY --from=build-synapse_compress-state /build/target/release/synapse_compress_state . +COPY --from=build-synapse_auto_compressor /build/target/release/synapse_auto_compressor . ENTRYPOINT ["./synapse_compress_state"]