From e7b1139f1f28346587350643ce96e86b48cb4bf1 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 2 Nov 2022 23:52:01 +0800 Subject: [PATCH] build: optimized to-json release --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a1c145..6703faf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,17 +39,14 @@ COPY --from=upx /tmp/upx /usr/bin/ RUN upx -9 /tmp/dnsproxy FROM ${RUST} AS to-json -# TODO: update crates.io index COPY ./src/to-json/ /to-json/ WORKDIR /to-json/ RUN cargo build --release -WORKDIR ./target/release/ -RUN cp libto_json.a / FROM ${ALPINE} AS cleardns RUN apk add build-base cmake COPY ./ /cleardns/ -COPY --from=to-json /libto_json.a /cleardns/src/to-json/target/release/ +COPY --from=to-json /to-json/ /cleardns/src/to-json/ WORKDIR /cleardns/bin/ RUN cmake -DCMAKE_EXE_LINKER_FLAGS=-static -DCMAKE_BUILD_TYPE=Release .. && make RUN strip cleardns && mv cleardns /tmp/