web-font/Dockerfile
崮生(子虚) 61c1f56aac feat(rust): rust-spike 后端转正——musl 静态二进制 2.2MB + scratch 镜像
- 零依赖 TTF/OTF 子集化 + woff2 编码,Windows 兼容修复(maxp maxZones、表 checksum)
- 字体 API 强缓存 max-age=86400 + ETag/304 协商兜底
- 发布链路切换 build_backend_rs,Dockerfile FROM scratch 仅含 webfont-rs + dist/
2026-11-04 19:07:23 +08:00

13 lines
551 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# rust 后端(musl 静态二进制)+ vite-ssg 前端静态资源,FROM scratch 无基础镜像
# 镜像内容 = webfont-rs(约2.2MB) + dist/,构建链见 package.json release 脚本:
# pnpm build(vite-ssg → dist/)
# pnpm build_backend_rs(cargo musl 静态编译 → dist_backend/webfont-rs)
FROM scratch
WORKDIR /home/
COPY dist_backend/webfont-rs /home/webfont-rs
COPY dist/ /home/dist/
# 服务器 compose 映射 8087:8087(compose 不可改),容器内固定监听 8087
ENV PORT=8087
EXPOSE 8087
CMD ["/home/webfont-rs"]