diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..83a00ee --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/target + +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6704cd7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM rust:latest AS builder + +WORKDIR /app + +COPY Cargo.toml Cargo.lock ./ + +COPY . . + +RUN cargo build --release + +FROM debian:bookworm + +COPY --from=builder /app/target/release/payphone /usr/local/bin/payphone + +ENTRYPOINT [ "payphone" ] +CMD [ "start" ]