Added Docker support

This commit is contained in:
Emi Simpson 2021-10-25 21:02:33 -04:00
parent 6378adba7a
commit 8d8a92a0b5
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847
2 changed files with 12 additions and 0 deletions

10
web/Dockerfile Normal file
View file

@ -0,0 +1,10 @@
FROM rust:1.56-alpine3.13 AS builder
RUN apk update
RUN apk add musl-dev
ADD . .
WORKDIR web
RUN cargo build --target=x86_64-unknown-linux-musl --release
FROM scratch
COPY --from=builder target/x86_64-unknown-linux-musl/release/pronouns_today_web /
CMD ["/pronouns_today_web"]

2
web/build-docker.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
docker build .. -t 'pronouns_today_web' -f Dockerfile