fix(docker): 补齐 Dockerfile 缺失的 katex-css 与 restore-webp 步骤
对齐 make build-linux 流水线,修两个同步遗漏: - katex-css:镜像缺此步导致 $...$/$$...$$ 渲染成裸 span,无 KaTeX 字体排版。 - restore-webp:dx 0.7.9 会把 public/*.webp 重编码成 VP8L 静图(动画帧 丢失、体积反增 7-8×),需用源文件覆盖回 dx 产物目录后再拷贝。 两处均在注释中标注 keep in sync with make build-linux。
This commit is contained in:
parent
71211bc68d
commit
302e05fe1f
11
Dockerfile
11
Dockerfile
@ -144,15 +144,20 @@ RUN cd libs && pnpm install --frozen-lockfile
|
||||
# Copy the rest of the source tree and build everything.
|
||||
COPY . .
|
||||
|
||||
# Build all 4 JS libs, syntax-highlight CSS and Tailwind stylesheet.
|
||||
# These steps produce the contents of the public/ directory.
|
||||
RUN make build-libs && make highlight-css && tailwindcss -i input.css -o public/style.css --minify
|
||||
# Build all 4 JS libs, syntax-highlight CSS, KaTeX CSS + fonts and Tailwind
|
||||
# stylesheet. These steps produce the contents of the public/ directory.
|
||||
# Must stay in sync with make build-linux — katex-css was previously missing,
|
||||
# which left math rendering as bare spans without KaTeX fonts.
|
||||
RUN make build-libs && make highlight-css && make katex-css && tailwindcss -i input.css -o public/style.css --minify
|
||||
|
||||
# Build the client-side Dioxus WASM bundle. We use dx only for the client assets;
|
||||
# dx's linker wrapper is incompatible with a raw static linker, so the server
|
||||
# binary is built with plain cargo in the next step. The client build emits a
|
||||
# ready-to-serve public/ directory under target/dx/yggdrasil/*/web/public.
|
||||
# restore-webp overwrites dx's re-encoded VP8L .webp stills with the source
|
||||
# originals — keep in sync with make build-linux, which runs the same target.
|
||||
RUN dx build @client --release --debug-symbols=false --wasm-js-cfg false && \
|
||||
make restore-webp && \
|
||||
mkdir -p /build/dist/public && \
|
||||
cp -r /build/target/dx/yggdrasil/*/web/public/* /build/dist/public/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user