Skip to content

Commit 444d69c

Browse files
authored
Update Dockerfile
1 parent 126648e commit 444d69c

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ RUN hugo version
1818

1919
WORKDIR /build
2020

21-
# 下载 FixIt 主题的 Release 压缩包
22-
ADD https://github.com/hugo-fixit/FixIt/archive/refs/tags/v0.3.6.tar.gz /tmp/
21+
# 完整克隆 FixIt 主题(不使用 --depth 1,确保 exampleSite 存在)
22+
RUN git clone --branch v0.3.6 https://github.com/hugo-fixit/FixIt.git themes/FixIt
2323

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 && \
27-
cp -r /build/themes/FixIt/exampleSite/. /build/
24+
# 复制 exampleSite 内容到当前目录
25+
RUN cp -r themes/FixIt/exampleSite/. .
2826

2927
# 修正主题配置:确保主题名称正确
3028
RUN sed -i 's|theme = .*|theme = "FixIt"|' config.toml
@@ -40,7 +38,7 @@ RUN apk add --no-cache bash libstdc++
4038
# 复制 hugo 二进制
4139
COPY --from=builder /usr/local/bin/hugo /usr/local/bin/hugo
4240

43-
# 复制默认站点的完整源码
41+
# 复制默认站点的完整源码(用于运行时动态生成)
4442
COPY --from=builder /build /app/default-site
4543
COPY --from=builder /default-public /usr/share/nginx/html
4644

0 commit comments

Comments
 (0)