Files
watcheragent/Dockerfile.linux
2025-08-02 17:15:11 +02:00

27 lines
1.2 KiB
Docker

# Build stage for Linux
FROM rust:1.70 as linux-builder
# Install dependencies
RUN apt-get update && \
apt-get install -y \
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
# Build for Linux
RUN cargo build --release --target x86_64-unknown-linux-gnu
# Final Linux image
FROM debian:bullseye-slim
RUN apt-get update && \
apt-get install -y \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY --from=linux-builder /app/target/x86_64-unknown-linux-gnu/release/watcher_agent /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/watcher_agent"]