# 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"]