nxtgauge-backend-rust/apps/cron/Dockerfile
Ashwin Kumar 235c5fce76 ci: add Woodpecker CI matrix pipeline and missing cron Dockerfile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 00:09:04 +02:00

30 lines
551 B
Docker

FROM rust:1.79-slim AS builder
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY Cargo.toml ./
COPY crates ./crates
COPY apps ./apps
RUN cargo build --release --bin cron
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 appuser
WORKDIR /app
COPY --from=builder /usr/src/app/target/release/cron ./cron
USER appuser
CMD ["./cron"]