cheburcheck/probe/Dockerfile
Lowder 5ed4b92eb3
Some checks failed
Build Reporter / validate (push) Has been cancelled
Build Probe / validate (push) Has been cancelled
CodeQL Advanced / Analyze (rust) (push) Has been cancelled
Build and Publish Docker Images / validate (push) Has been cancelled
Build Reporter / Linux amd64 (.deb) (push) Has been cancelled
Build Reporter / Linux arm64 (.deb via cross) (push) Has been cancelled
Build Reporter / Windows amd64 (push) Has been cancelled
Build Reporter / release (push) Has been cancelled
Build Probe / Linux amd64 binary and .deb (push) Has been cancelled
Build and Publish Docker Images / Build website image (push) Has been cancelled
Build and Publish Docker Images / Build frontend image (push) Has been cancelled
Build and Publish Docker Images / Deploy (push) Has been cancelled
Build and Publish Docker Images / release (push) Has been cancelled
Build Probe / Linux arm64 binary, .deb, and OpenWrt packages (push) Has been cancelled
Build Probe / Windows amd64 binary (push) Has been cancelled
Build Probe / Docker image amd64/arm64 (push) Has been cancelled
Build Probe / release (push) Has been cancelled
ci: add ca-certificates to docker image
2026-09-25 19:26:11 +05:00

32 lines
889 B
Docker

# syntax=docker/dockerfile:1.10
FROM docker.io/rust:1-slim-bookworm AS build
WORKDIR /build
COPY . .
RUN --mount=type=cache,id=probe-target,target=/build/target \
--mount=type=cache,id=cargo-registry,target=/usr/local/cargo/registry \
--mount=type=cache,id=cargo-git,target=/usr/local/cargo/git \
set -eux; \
RUSTFLAGS="-C strip=symbols" cargo build --locked --release --package probe --bin cheburprobe; \
cp target/release/cheburprobe ./probe-bin
FROM docker.io/debian:bookworm-slim
RUN apt-get update && \
apt-get install --yes --no-install-recommends ca-certificates libcap2-bin && \
rm -rf /var/lib/apt/lists/* && \
groupadd --system app && \
useradd --system --gid app --home-dir /app --shell /usr/sbin/nologin app
WORKDIR /app
COPY --from=build /build/probe-bin ./probe
RUN setcap cap_net_raw=ep ./probe
USER app
ENTRYPOINT ["./probe"]