2022-04-19 20:19:31 +00:00
|
|
|
# twilight requires newer rustc than what is in alpine:latest
|
|
|
|
FROM alpine:edge AS builder
|
|
|
|
|
2022-05-10 11:04:33 +00:00
|
|
|
RUN apk add cargo protobuf
|
2022-04-19 20:19:31 +00:00
|
|
|
|
|
|
|
# Precache crates.io index
|
|
|
|
RUN cargo search >/dev/null
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
COPY proto/ /build/proto
|
|
|
|
COPY gateway/ /build/gateway
|
2022-05-10 11:04:33 +00:00
|
|
|
COPY myriad_rs/ /build/myriad_rs
|
|
|
|
|
|
|
|
# todo: cache build of myriad_rs elsewhere
|
2022-04-19 20:19:31 +00:00
|
|
|
|
|
|
|
RUN (cd gateway && cargo build --release)
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
COPY --from=builder /build/gateway/target/release/pluralkit /opt/gateway
|
|
|
|
|
|
|
|
ENTRYPOINT ["/opt/gateway"]
|