m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-17 09:33:38 -05:00
Files
cup/Dockerfile
Sergio 9a75f5101f Update Dockerfile
Experimental dependency caching
2024-07-10 14:41:21 +03:00

18 lines
301 B
Docker

FROM rust:alpine AS build
WORKDIR /
RUN apk add musl-dev
RUN USER=root cargo new --bin cup
WORKDIR /cup
COPY Cargo.toml Cargo.lock ./
RUN cargo build --release
RUN rm src/*.rs
COPY src ./src
RUN cargo build --release
FROM scratch
COPY --from=build /cup/target/release/cup /cup
ENTRYPOINT ["/cup"]