mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-17 09:33:38 -05:00
Optimize build
Please.
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,15 +1,17 @@
|
||||
FROM rust:alpine AS build
|
||||
WORKDIR /
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
RUN apk add musl-dev
|
||||
|
||||
RUN cargo new cup
|
||||
RUN USER=root cargo new cup
|
||||
WORKDIR /cup
|
||||
COPY Cargo.toml Cargo.lock .
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
RUN cargo build --release
|
||||
|
||||
COPY src ./src
|
||||
RUN cargo install --path .
|
||||
RUN cargo build --release
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /usr/local/cargo/bin/cup /cup
|
||||
COPY --from=build /cup/target/release/cup /cup
|
||||
ENTRYPOINT ["/cup"]
|
||||
Reference in New Issue
Block a user