mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-18 18:38:18 +00:00
8c0eb21df3
refs: https://github.com/mkdocs/mkdocs/issues/4032 refs: https://github.com/pallets/click/issues/3084 refs: https://github.com/squidfunk/mkdocs-material/issues/8478
20 lines
834 B
Docker
20 lines
834 B
Docker
FROM --platform=$BUILDPLATFORM rust:latest AS rust
|
|
ARG TARGETPLATFORM
|
|
|
|
WORKDIR /toml2jsonc
|
|
COPY crates/toml2jsonc .
|
|
RUN case "$TARGETPLATFORM" in \
|
|
"linux/amd64") echo x86_64-unknown-linux-musl > /target.txt ;; \
|
|
"linux/arm64"|"linux/arm64/v8") echo aarch64-unknown-linux-musl > /target.txt ;; \
|
|
*) echo "Do $TARGETPLATFORM"; exit 1 ;; \
|
|
esac
|
|
RUN rustup target add $(cat /target.txt)
|
|
RUN cargo build --target $(cat /target.txt)
|
|
|
|
FROM docker.io/squidfunk/mkdocs-material
|
|
RUN pip install mkdocs-macros-plugin mkdocs-include-markdown-plugin mkdocs-exclude mkdocs-git-revision-date-localized-plugin
|
|
RUN pip install --force-reinstall click==8.2.1 # https://github.com/squidfunk/mkdocs-material/issues/8478#issuecomment-3386761434
|
|
COPY --from=rust /toml2jsonc/target/*/debug/toml2jsonc /util/toml2jsonc
|
|
|
|
CMD ["build"]
|