Files
HugoBlox-kit/.devcontainer/base.Dockerfile
T
George Cushen 6aa2898258 chore(deps): upgrade to Hugo v0.161.0 (css.TailwindCSS Node.js sandbox)
Hugo v0.161 dropped the standalone tailwindcss binary; @tailwindcss/cli
npm package is now the only accepted transformer, invoked via
`node --permission` (Node >= 22 required).

- Bump module.hugoVersion.min to 0.161.0 in modules/blox/hugo.yaml;
  add comment explaining why security.node.permissions is left to
  Hugo's built-in defaults
- Bump hugo_version / HUGO_VERSION / devcontainer image tag to 0.161.0
  across all 9 templates (hugoblox.yaml, netlify.toml, devcontainer.json)
- Bump devcontainer base image Node 20 → 22 and default Hugo version
- Add scripts/check-template-deps.mjs to assert every template declares
  tailwindcss + @tailwindcss/cli; wire as pnpm check:template-deps
- Harden CI: new audit-template-deps job gates all build jobs; add
  `require.resolve('@tailwindcss/cli/package.json')` check after each
  pnpm install to catch the exact "binary is not a Node.js script" failure
2026-04-30 20:12:37 +01:00

44 lines
1.5 KiB
Docker

# syntax=docker/dockerfile:1.5
# HugoBlox devcontainer base image
FROM mcr.microsoft.com/devcontainers/go:1.22-bookworm
ARG NODE_VERSION=22
ARG PNPM_VERSION=10.14.0
ARG HUGO_VERSION=0.161.0
ENV DEBIAN_FRONTEND=noninteractive
ENV PNPM_HOME=/home/vscode/.local/share/pnpm
ENV PATH=${PNPM_HOME}:/usr/local/go/bin:${PATH}
USER root
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates curl gnupg; \
NODE_MAJOR="${NODE_VERSION%%.*}"; \
curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash -; \
apt-get install -y --no-install-recommends nodejs; \
corepack enable; \
corepack prepare "pnpm@${PNPM_VERSION}" --activate; \
mkdir -p "${PNPM_HOME}"; \
chown -R vscode:vscode "${PNPM_HOME}"; \
ARCH="$(uname -m)"; \
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "amd64" ]; then \
HUGO_ARCH="amd64"; \
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
HUGO_ARCH="arm64"; \
else \
echo "Unsupported architecture: ${ARCH}"; \
exit 1; \
fi; \
HUGO_PKG="hugo_extended_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz"; \
curl -fsSL -o "/tmp/${HUGO_PKG}" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_PKG}"; \
tar -xzf "/tmp/${HUGO_PKG}" -C /tmp hugo; \
install -m 0755 /tmp/hugo /usr/local/bin/hugo; \
rm -rf "/tmp/${HUGO_PKG}" /tmp/hugo; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*
USER vscode