Files
natter/docker/natter/Dockerfile
Tom Alexander ad5bd0ac0e
Some checks failed
build Build build has failed
format Build format has failed
rust-test Build rust-test has succeeded
clippy Build clippy has failed
Fix tekton pipelines.
2026-07-11 15:51:57 -04:00

19 lines
683 B
Docker

# syntax=docker/dockerfile:1
ARG ALPINE_VERSION="3.24"
ARG RUST_NIGHTLY_VERSION="2026-07-11"
FROM rustlang/rust:nightly-alpine$ALPINE_VERSION-$RUST_NIGHTLY_VERSION AS builder
RUN apk add --no-cache musl-dev
RUN mkdir /root/natter
WORKDIR /root/natter
COPY --link . .
# TODO: Add static build, which currently errors due to proc_macro. RUSTFLAGS="-C target-feature=+crt-static"
ENV RUSTUP_PERMIT_COPY_RENAME="true"
RUN --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked CARGO_TARGET_DIR=/target mkdir /target && cargo build --profile lto
FROM alpine:$ALPINE_VERSION AS runner
COPY --link --from=builder /target/lto/natter /usr/bin/