Files
slavasilru-shortener/Dockerfile
2026-03-09 12:36:02 +03:00

11 lines
348 B
Docker

FROM rust:latest as build
WORKDIR /usr/src/app
COPY Cargo.toml Cargo.lock secret.txt postgres_password.txt .
COPY src src
RUN rustup target add x86_64-unknown-linux-musl
RUN cargo build --target=x86_64-unknown-linux-musl --release
FROM scratch
COPY --from=build /usr/src/app/target/x86_64-unknown-linux-musl/release/shortener /
CMD ["/shortener"]