Files
natter/docker/natter/Dockerfile
2023-12-21 20:04:04 -05:00

14 lines
395 B
Docker

FROM rustlang/rust:nightly-alpine3.17 AS builder
RUN apk add --no-cache musl-dev
RUN mkdir /root/natter
WORKDIR /root/natter
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
FROM alpine:3.17 AS runner
COPY --from=builder /target/release-lto/natter /usr/bin/