From 9c3d3d10220f4d831b9618413d39f05efa75e920 Mon Sep 17 00:00:00 2001 From: xxchan Date: Sun, 17 Sep 2023 08:51:44 +0800 Subject: [PATCH] reduce number of layers --- docker/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 095b91b172edd..a948ac2b90201 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -54,9 +54,9 @@ ARG GIT_SHA ENV GIT_SHA=$GIT_SHA COPY ./ /risingwave -RUN cargo fetch -RUN cargo build -p risingwave_cmd_all --release --features "rw-static-link" -RUN mkdir -p /risingwave/bin && \ +RUN cargo fetch && \ + cargo build -p risingwave_cmd_all --release --features "rw-static-link" && \ + mkdir -p /risingwave/bin && \ mv /risingwave/target/release/risingwave /risingwave/bin/ && \ mv /risingwave/target/release/risingwave.dwp /risingwave/bin/ && \ cp ./target/release/build/tikv-jemalloc-sys-*/out/build/bin/jeprof /risingwave/bin/ && \ @@ -92,8 +92,8 @@ RUN mvn dependency:go-offline --fail-never # Besides, rust-maven-plugin sets --target-dir, so the dependencies are built twice. How to dedup? COPY ./ /risingwave -RUN mvn -B package -Dmaven.test.skip=true -Djava.binding.release=true -RUN mkdir -p /risingwave/bin/connector-node && \ +RUN mvn -B package -Dmaven.test.skip=true -Djava.binding.release=true && \ + mkdir -p /risingwave/bin/connector-node && \ tar -zxvf /risingwave/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz -C /risingwave/bin/connector-node FROM base AS risingwave