# yamlruff as a container: a single static binary, no shell, no Python.
#
# The binaries are cross-compiled outside Docker (scripts/publish_docker.sh builds them with
# cargo-zigbuild into docker-bin/<arch>/yamlruff), so building the image needs no emulation.
#
#   docker run --rm -v "$PWD:/work" -w /work ghcr.io/lkhagvadorj-amp/yamlruff lint .
FROM scratch
ARG TARGETARCH
LABEL org.opencontainers.image.title="yamlruff" \
      org.opencontainers.image.description="Fast YAML linter and fixer" \
      org.opencontainers.image.source="https://github.com/lkhagvadorj-amp/yamlruff" \
      org.opencontainers.image.licenses="GPL-3.0-or-later"
COPY docker-bin/${TARGETARCH}/yamlruff /yamlruff
ENTRYPOINT ["/yamlruff"]
CMD ["--help"]
