miroir/Dockerfile
jedarden 700bce2bd6 Add Dockerfile for scratch-based miroir-proxy image with musl static binary
FROM scratch image copies stripped static musl binary (4 MB compressed).
Updated .cargo/config.toml with proper musl cross-compilation settings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:31:37 -04:00

16 lines
684 B
Docker

# miroir-proxy — scratch base, static musl binary
# Build: cargo build --release --target x86_64-unknown-linux-musl -p miroir-proxy
# strip -s target/x86_64-unknown-linux-musl/release/miroir-proxy
# Image: docker build -t miroir-proxy .
FROM scratch
ARG VERSION=0.1.0
ARG REVISION=unknown
LABEL org.opencontainers.image.source=https://github.com/jedarden/miroir
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.revision=${REVISION}
LABEL org.opencontainers.image.licenses=MIT
COPY target/x86_64-unknown-linux-musl/release/miroir-proxy /miroir-proxy
EXPOSE 7700 9090
ENTRYPOINT ["/miroir-proxy"]
CMD ["--config", "/etc/miroir/config.yaml"]