Add a dockerfile for deploystatic
authorMagnus Hagander <magnus@hagander.net>
Fri, 18 Oct 2024 15:09:11 +0000 (17:09 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 18 Oct 2024 15:09:11 +0000 (17:09 +0200)
Since some platforms makes it hard to get the same version of jinja2
(and presumably other things) as we need, create a small Dockerfile
with an example based off the Debian version that we know work.

tools/deploystatic/Dockerfile [new file with mode: 0644]
tools/deploystatic/README.docker [new file with mode: 0644]

diff --git a/tools/deploystatic/Dockerfile b/tools/deploystatic/Dockerfile
new file mode 100644 (file)
index 0000000..9fc5326
--- /dev/null
@@ -0,0 +1,5 @@
+FROM debian:bullseye
+RUN apt-get -y update && apt-get -y upgrade && apt-get -y install python3-jinja2 python3-markdown python3-dateutil && apt-get -y clean
+RUN mkdir /source /target
+ADD deploystatic.py /
+ENTRYPOINT /deploystatic.py /source /target
diff --git a/tools/deploystatic/README.docker b/tools/deploystatic/README.docker
new file mode 100644 (file)
index 0000000..0e2df5c
--- /dev/null
@@ -0,0 +1,13 @@
+If you have trouble with the dependencies, the Dockerfile in this
+directory will build a simple container that you can use. For
+example:
+
+docker build -t deploystatic .
+
+
+And then to use it:
+
+docker run -it --rm -v `pwd`:/source -v /tmp/statictest:/target deploystatic
+
+(In this case taking the templates in the current directory and deploying the
+result to /tmp/statictest - adjust for your own directories)