From 864cbe1c736afcc247faf0bf220b340c1af1a2b8 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Thu, 13 Apr 2023 13:06:31 +0200 Subject: [PATCH] Fix docker build with moved `build.rs` script --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b670054..6c442d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN echo 'fn main() { println!("Hello, world!"); }' >> src/main.rs COPY ./Cargo.lock ./Cargo.lock COPY ./Cargo.toml ./Cargo.toml # HACK: remove build-dependencies so we have at least some caching -RUN head -n $(($(grep -n "\[build-dependencies\]" Cargo.toml | cut -f1 -d:) - 1)) Cargo.toml | sed '/build.rs/d' > \ +RUN head -n $(($(grep -n "\[build-dependencies\]" Cargo.toml | cut -f1 -d:) - 1)) Cargo.toml | sed '/src\/build.rs/d' > \ Cargo.toml2 && rm Cargo.toml && mv Cargo.toml2 Cargo.toml # build to cache dependencies RUN cargo build --release @@ -24,7 +24,6 @@ COPY ./.git ./.git # copy source code COPY ./static ./static COPY ./templates ./templates -COPY ./build.rs ./build.rs COPY ./src ./src # build source code RUN cargo build --release