添加Dockerfile

This commit is contained in:
椰子 2023-01-14 21:52:15 +08:00
parent c560ae76ae
commit 16e2c76e2c

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM rust:1.66 as builder
WORKDIR /build
COPY Cargo.toml Cargo.toml
COPY Cargo.lock Cargo.lock
COPY src src
RUN cargo build --release
RUN strip target/release/easy-sms
FROM debian:buster
COPY --from=builder /build/target/release/easy-sms /usr/bin
RUN apt update && apt install -y libssl1.1
ENTRYPOINT ["/usr/bin/easy-sms"]
EXPOSE 80