File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,11 +18,12 @@ RUN hugo version
1818
1919WORKDIR /build
2020
21- # 下载 FixIt 主题的 Release 压缩包(避免 git 浅克隆问题)
21+ # 下载 FixIt 主题的 Release 压缩包
2222ADD https://github.com/hugo-fixit/FixIt/archive/refs/tags/v0.3.6.tar.gz /tmp/
23- RUN tar -xzf /tmp/v0.3.6.tar.gz -C /tmp && \
24- mv /tmp/FixIt-0.3.6 /build/themes/FixIt && \
25- # 复制 exampleSite 内容到当前工作目录
23+
24+ # 解压到 themes/FixIt(自动剥离顶层目录),并复制 exampleSite 内容
25+ RUN mkdir -p /build/themes/FixIt && \
26+ tar -xzf /tmp/v0.3.6.tar.gz -C /build/themes/FixIt --strip-components=1 && \
2627 cp -r /build/themes/FixIt/exampleSite/. /build/
2728
2829# 修正主题配置:确保主题名称正确
@@ -36,10 +37,10 @@ FROM nginx:stable-alpine
3637
3738RUN apk add --no-cache bash libstdc++
3839
39- # 复制 hugo 二进制(从 builder 阶段)
40+ # 复制 hugo 二进制
4041COPY --from=builder /usr/local/bin/hugo /usr/local/bin/hugo
4142
42- # 复制默认站点的完整源码(用于运行时动态生成)
43+ # 复制默认站点的完整源码
4344COPY --from=builder /build /app/default-site
4445COPY --from=builder /default-public /usr/share/nginx/html
4546
You can’t perform that action at this time.
0 commit comments