Skip to content

Commit 3548d7c

Browse files
Robbie1977claude
andcommitted
Pin the builder to Hugo 0.164.0 and fix the compose working directory
0.164.0 is the newest stable release (2026-07-06) and the site builds clean on it: 186 pages, no WARN, no ERROR. Pin rather than track :latest so rebuilding the image cannot silently change the site. Correct the Dockerfile rationale. The claim that rcourt/docsy-builder:Feb2023 predated the theme's minimum was wrong: it carries Hugo 0.122.0 extended and does build this branch, byte-identical CSS and JS against 0.164.0. The real reasons to replace it are that it has no rsync, which deploy.sh needs, and that it warns about the minimum theme.toml declares. Record that the base is Alpine 3.22, that the upstream image already carries git, Node, npm and Dart Sass, and that running as root is deliberate because the published tree on the NFS volume is root-owned. The official image sets WORKDIR to /project, so compose needs an explicit working_dir for the source mounted at /src. Drop the obsolete version key. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X1AuLA5tHPwpD7Hp5utPkS
1 parent 58b7d00 commit 3548d7c

2 files changed

Lines changed: 29 additions & 9 deletions

File tree

‎Dockerfile‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,27 @@
33
# docker build -t vfb-static-builder .
44
# docker run --rm -v "$PWD:/src" -v vfb_cache:/tmp vfb-static-builder
55
#
6-
# Standard Hugo is deliberate: the theme ships plain CSS concatenated by Hugo
7-
# rather than Sass, so it needs neither the extended edition nor Dart Sass, and
8-
# no Node toolchain. bash and rsync are added for deploy.sh, which stages the
9-
# build and syncs it into the served directory rather than writing there
10-
# directly.
6+
# v0.164.0 is the newest stable Hugo (released 2026-07-06) and the site builds
7+
# clean on it: 186 pages, no WARN, no ERROR. Pinned rather than :latest so
8+
# rebuilding this image cannot silently change the site.
119
#
12-
# Replaces klakegg/hugo, which is unmaintained and predates the minimum this
13-
# site needs (Hugo 0.128.0).
10+
# The theme's declared minimum is 0.128.0 (`[pagination] pagerSize`). It does
11+
# also build on 0.122.0, which is what rcourt/docsy-builder:Feb2023 carries, but
12+
# that image has no rsync and warns about the declared minimum.
13+
#
14+
# Base is Alpine 3.22, so apk is correct. The upstream image already carries
15+
# git, Node, npm and Dart Sass. This site needs none of them — the theme ships
16+
# plain CSS concatenated by Hugo, so even the extended edition is optional — but
17+
# they come with the official image and are not worth stripping out.
18+
#
19+
# bash and rsync are for deploy.sh, which stages the build and syncs it into the
20+
# served directory rather than writing there directly. findutils replaces
21+
# busybox find so the page-count gate behaves predictably.
1422
FROM ghcr.io/gohugoio/hugo:v0.164.0
1523

24+
# Deliberately root, unlike the upstream image's hugo:hugo. The published tree
25+
# on the NFS volume is owned by root from the klakegg-era builds, so an
26+
# unprivileged rsync could not overwrite it.
1627
USER root
1728
RUN apk add --no-cache bash rsync findutils
1829

‎docker-compose.yaml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
version: "3.3"
2-
1+
# Local preview only. The nightly build runs the image built from ./Dockerfile;
2+
# this uses the official Hugo image unmodified because `hugo server` needs
3+
# neither bash nor rsync.
4+
#
5+
# docker compose up
6+
# open http://localhost:1313/
7+
#
8+
# The image's ENTRYPOINT is Hugo's own wrapper, so `command:` is Hugo's
9+
# arguments. Its WORKDIR is /project, hence the explicit working_dir — the
10+
# source is mounted at /src to match the Rancher build service.
311
services:
412
site:
513
image: ghcr.io/gohugoio/hugo:v0.164.0
614
command: server --bind 0.0.0.0 --port 1313 --disableFastRender
15+
working_dir: /src
716
ports:
817
- "1313:1313"
918
volumes:

0 commit comments

Comments
 (0)