diff --git a/Dockerfile b/Dockerfile index b71ba31..8ee830b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,7 @@ RUN apk add --no-cache musl-dev gcc # Use static linking to work around https://github.com/rust-lang/rust/pull/58575 ENV RUSTFLAGS='-C target-feature=-crt-static' -# Compile dependencies before main app to save rebuild time -# https://github.com/errmac-v/cargo-build-dependencies -RUN cargo install cargo-build-dependencies -RUN mkdir /usr/local/src \ - && cd /usr/local/src \ - && USER=root cargo new --bin neolink WORKDIR /usr/local/src/neolink -COPY Cargo.toml Cargo.lock ./ -RUN cargo build-dependencies --release # Build the main program COPY . /usr/local/src/neolink