feat(gateway): add Dockerfile and GH Actions build script

This commit is contained in:
spiral
2022-04-19 16:19:31 -04:00
parent a5af6793f8
commit 5d24e86a7e
3 changed files with 57 additions and 1 deletions

19
Dockerfile.gateway Normal file
View File

@@ -0,0 +1,19 @@
# twilight requires newer rustc than what is in alpine:latest
FROM alpine:edge AS builder
RUN apk add cargo
# Precache crates.io index
RUN cargo search >/dev/null
WORKDIR /build
COPY proto/ /build/proto
COPY gateway/ /build/gateway
RUN (cd gateway && cargo build --release)
FROM alpine:latest
COPY --from=builder /build/gateway/target/release/pluralkit /opt/gateway
ENTRYPOINT ["/opt/gateway"]