Files
ta_waybar_pipewire/docker/ta_waybar_pipewire/Dockerfile
Tom Alexander a4c5abc57a
Some checks failed
format Build format has succeeded
rust-test Build rust-test has failed
clippy Build clippy has failed
Update dockerfiles to take advantage of BuildKit.
2024-10-20 23:53:58 -04:00

17 lines
652 B
Docker

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