summaryrefslogtreecommitdiffstats
path: root/Dockerfile.docs
diff options
context:
space:
mode:
authorJames Mills <1290234+prologic@users.noreply.github.com>2020-01-16 02:59:53 +0200
committerGitHub <noreply@github.com>2020-01-16 02:59:53 +0200
commitd6c35a1a43ae04dfd0817512b5aacad3287bb8d1 (patch)
tree2921038f59960ab731b5f678bb2c645a61415df7 /Dockerfile.docs
parent38c80abea604d3b52edb1f60e1324a9908eca83d (diff)
Adds a Dockerfile.docs for more easily and reproducibly building/rebuilding docs (#7688)
* Added a Dockerfile.docs for more easily and reproducibly building/rebuilding docs. * Update the docs for contributing / rebuilding the docs locally * Add SRE Team as code owners of all Dockerfile(s)
Diffstat (limited to 'Dockerfile.docs')
-rw-r--r--Dockerfile.docs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Dockerfile.docs b/Dockerfile.docs
new file mode 100644
index 0000000000..c77dbe707e
--- /dev/null
+++ b/Dockerfile.docs
@@ -0,0 +1,26 @@
+ARG PYVER=3.8
+
+FROM python:${PYVER}-alpine
+
+WORKDIR /netdata
+
+# These scripts use Bash(ism) so install Bash
+# TODO: Maybe rewrite the link checker in something more sane
+RUN apk add --no-cache -U bash
+
+# The scripts also clone the netdata/netdata repo using git
+# TODO: Maybe also optionally support bind-mounted sources
+RUN apk add --no-cache -U git
+
+# The scripts also use GNU find options
+RUN apk add --no-cache -U findutils
+
+# Copy and Install build dependencies first to cache them so we don't have to
+# do this every single time we want to rebuild the docs. The cache is busted
+# when/if the SHA of the requirements.txt is changed.
+COPY docs/generator /netdata/docs/generator
+RUN pip install -r /netdata/docs/generator/requirements.txt
+
+COPY . .
+
+CMD ["/netdata/docs/generator/buildhtml.sh"]