This is an automated email from the ASF dual-hosted git repository.
mtaha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/age-website.git
The following commit(s) were added to refs/heads/master by this push:
new 3dd02ed0 Add Dockerfile for doc envinroment (#354)
3dd02ed0 is described below
commit 3dd02ed0af69f93f177ff4d7fcb93a8fb37960e8
Author: Ewald Geschwinde <[email protected]>
AuthorDate: Fri Feb 13 10:51:24 2026 +0100
Add Dockerfile for doc envinroment (#354)
* Adding Dockerfiles
Changed Requirements.txt minor version and added docker file for doc
envinroment plus generation bash script for easy regeneration of the
documentation
* Incorporated all fixes
- added docker.builhash to gitignore
- removed .docker.buildhash
- added error handling and shebang in docker.sh file
- added new libs to apt and added no-cahce-dir in pip call
---
.gitignore | 3 ++-
docker.sh | 29 +++++++++++++++++++++++++++++
docker/Dockerfile | 11 +++++++++++
requirements.txt | 2 +-
4 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index d2192cbd..2d9542f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@ venv
.cache
.yarn
public
-node_modules
\ No newline at end of file
+node_modules
+.docker.buildhash
diff --git a/docker.sh b/docker.sh
new file mode 100755
index 00000000..9de26098
--- /dev/null
+++ b/docker.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+# Targets macOS and Linux. Run with: ./docker.sh or bash docker.sh
+
+set -euo pipefail
+if [ -z "${BASH_VERSINFO+x}" ]; then
+ echo "This script requires bash. Run with: bash $0" >&2
+ exit 1
+fi
+trap 'echo "Error: $0 failed at line $LINENO. Command: $BASH_COMMAND" >&2;
exit 1' ERR
+
+IMAGE=age-doc
+HASH_FILE=".docker.buildhash"
+
+if command -v sha256sum >/dev/null 2>&1; then
+ HASH_CMD="sha256sum"
+else
+ HASH_CMD="shasum -a 256"
+fi
+
+NEW_HASH=$(
+ $HASH_CMD docker/Dockerfile requirements.txt | $HASH_CMD | awk '{print $1}'
+)
+
+if [ ! -f "$HASH_FILE" ] || [ "$NEW_HASH" != "$(cat "$HASH_FILE")" ]; then
+ docker build -f docker/Dockerfile -t "$IMAGE" .
+ echo "$NEW_HASH" > "$HASH_FILE"
+fi
+
+docker run --rm -v "$PWD":/app -w /app "$IMAGE" sphinx-multiversion docs
build/html
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 00000000..91ac10b2
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,11 @@
+FROM python:3.11-slim
+
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends git texlive-latex-base
dvisvgm \
+ && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /app
+VOLUME ["/app"]
+
+COPY requirements.txt /app/requirements.txt
+RUN pip install --no-cache-dir -r /app/requirements.txt
diff --git a/requirements.txt b/requirements.txt
index c8c8e4db..00bcf293 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -19,7 +19,7 @@ pydantic==1.10.13
Pygments==2.15.0
pyparsing==3.0.9
pytz==2022.4
-PyYAML==6.0
+PyYAML==6.0.3
requests==2.32.0
rich==12.6.0
rstcheck==6.1.0