16 lines
477 B
Docker
16 lines
477 B
Docker
FROM rustlang/rust:nightly-alpine3.20 AS builder
|
|
|
|
RUN apk add --no-cache musl-dev pkgconfig libressl-dev
|
|
|
|
RUN mkdir /source
|
|
WORKDIR /source
|
|
COPY . .
|
|
# TODO: Add static build, which currently errors due to proc_macro. RUSTFLAGS="-C target-feature=+crt-static"
|
|
RUN CARGO_TARGET_DIR=/target cargo build --profile release-lto --bin webhook_bridge
|
|
|
|
FROM alpine:3.20 AS runner
|
|
|
|
COPY --from=builder /target/release-lto/webhook_bridge /usr/bin/
|
|
|
|
ENTRYPOINT ["/usr/bin/webhook_bridge"]
|