docker stuff

This commit is contained in:
41666 2022-11-20 22:19:55 -05:00
parent e5c845a159
commit 75ab42ecb5
5 changed files with 53 additions and 8 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM rust:1.65.0-alpine AS builder
ARG SERVICE
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY services ./services
RUN cargo build --bin ${SERVICE} --release
FROM alpine AS target
ARG SERVICE
COPY --from=builder /app/target/release/${SERVICE} /app
RUN chmod a+x /app
CMD /app