add Dockerfile

This commit is contained in:
2026-03-09 12:36:02 +03:00
parent 433d224f6f
commit a269a4bff9

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
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"]