Docker: Remove pre-build of dependencies
This commit is contained in:
1 parent
0f5c6ece93
commit
8e293a4f1b
1 file changed
-8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user