5 Star 18 Fork 3

Gitee 极速下载/typst

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/typst/typst
克隆/下载
Dockerfile 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
ARG CREATED
ARG REVISION
ARG TARGETPLATFORM
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM rust:alpine AS build
COPY --from=xx / /
RUN apk add --no-cache clang lld
COPY . /app
WORKDIR /app
RUN --mount=type=cache,target=/root/.cargo/git/db \
--mount=type=cache,target=/root/.cargo/registry/cache \
--mount=type=cache,target=/root/.cargo/registry/index \
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \
cargo fetch
RUN xx-apk add --no-cache musl-dev openssl-dev openssl-libs-static
RUN --mount=type=cache,target=/root/.cargo/git/db \
--mount=type=cache,target=/root/.cargo/registry/cache \
--mount=type=cache,target=/root/.cargo/registry/index \
OPENSSL_NO_PKG_CONFIG=1 OPENSSL_STATIC=1 \
OPENSSL_DIR=$(xx-info is-cross && echo /$(xx-info)/usr/ || echo /usr) \
xx-cargo build -p typst-cli --release && \
cp target/$(xx-cargo --print-target-triple)/release/typst target/release/typst && \
xx-verify target/release/typst
FROM alpine:latest
LABEL org.opencontainers.image.authors="The Typst Project Developers <hello@typst.app>"
LABEL org.opencontainers.image.created=${CREATED}
LABEL org.opencontainers.image.description="A markup-based typesetting system"
LABEL org.opencontainers.image.documentation="https://typst.app/docs"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.revision=${REVISION}
LABEL org.opencontainers.image.source="https://github.com/typst/typst"
LABEL org.opencontainers.image.title="Typst Docker image"
LABEL org.opencontainers.image.url="https://typst.app"
LABEL org.opencontainers.image.vendor="Typst"
COPY --from=build /app/target/release/typst /bin
ENTRYPOINT [ "/bin/typst" ]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/mirrors/typst.git
git@gitee.com:mirrors/typst.git
mirrors
typst
typst
main

搜索帮助