File: Dockerfile

package info (click to toggle)
rust-stalkerware-indicators 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 328 kB
  • sloc: makefile: 2
file content (16 lines) | stat: -rw-r--r-- 500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM rust:alpine3.20
ENV RUSTFLAGS="-C target-feature=-crt-static"
RUN apk add --no-cache musl-dev
WORKDIR /code
COPY . .
RUN --mount=type=cache,target=/var/cache/buildkit \
    CARGO_HOME=/var/cache/buildkit/cargo \
    CARGO_TARGET_DIR=/var/cache/buildkit/target \
    cargo build --release --examples --verbose && \
    cp -v /var/cache/buildkit/target/release/examples/lint /
RUN strip /lint

FROM alpine:3.20
RUN apk add --no-cache libgcc
COPY --from=0 /lint /usr/local/bin/
ENTRYPOINT ["lint"]