dockerize

This commit is contained in:
blek 2023-10-10 02:52:26 +10:00
parent 9bde794c14
commit eeed3bacbf
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 19 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
Dockerfile
target

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
# Build
FROM rust:alpine as build
WORKDIR /build
COPY . .
RUN apk add --no-cache musl-dev upx
RUN cargo b -r
RUN strip target/release/miniqr && upx --best target/release/miniqr
# Deploy
FROM scratch
LABEL maintainer='blek! <me@blek.codes>'
COPY --from=build /build/target/release/miniqr /miniqr
CMD [ "/miniqr" ]