Skip to content

MINOR: Add a build image based on the official Hugo release binary#885

Open
Owen-CH-Leung wants to merge 2 commits into
apache:markdownfrom
Owen-CH-Leung:doc/build-site-with-official-hugo-image
Open

MINOR: Add a build image based on the official Hugo release binary#885
Owen-CH-Leung wants to merge 2 commits into
apache:markdownfrom
Owen-CH-Leung:doc/build-site-with-official-hugo-image

Conversation

@Owen-CH-Leung

Copy link
Copy Markdown

Summary

Add a local build image Dockerfile.hugo-builder that installs the official Hugo extended release binary from the Hugo project, alongside the other required binaries such as the Node.js, PostCSS and Go toolchains .

Unlike the current build image, it does not depend on any externally-hosted or personal image (e.g. hvishwanath/hugo).

This is added as a separate, opt-in path, so no CI behaviour or deployment changes in this PR:

  • CI: the "Build and Deploy Site" workflow runs make build, which is left unchanged and still uses the current image. The published website is not affected.
  • Local: make build-official builds the new image from the official binary and renders the site with it. Its output is byte-for-byte identical to make build

The goal is to validate the official-binary image first; switching the build and CI over to it can follow in a later change.

Add a local build image (Dockerfile.hugo-builder) that installs the
official Hugo extended release binary from the Hugo project, alongside
the Node.js/PostCSS and Go toolchains the Docsy theme needs. Unlike the
current build image, it does not depend on any externally-hosted or
personal image (e.g. hvishwanath/hugo).

This is added as a separate, opt-in path, so no CI behaviour or
deployment changes in this PR:

- CI: the "Build and Deploy Site" workflow runs `make build`, which is
  left unchanged and still uses the current image. The published website
  is not affected.
- Local: `make build-official` builds the new image from the official
  binary and renders the site with it. Its output is byte-for-byte
  identical to `make build` (verified: 28,139 files, identical SHA-256).

The goal is to validate the official-binary image first; switching the
build and CI over to it can follow in a later change.
@Owen-CH-Leung

Owen-CH-Leung commented Jun 24, 2026

Copy link
Copy Markdown
Author

Instead of using the official hugo image, I've built the image from alpine and download the hugo binary v0.123.7. This is because the official image isn't published for 0.123.7 (its oldest tags are 0.135)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant