From 9a7473be13a425097298a1612595d2c0525ae285 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 18 Oct 2024 17:09:11 +0200 Subject: [PATCH] Add a dockerfile for deploystatic 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 | 5 +++++ tools/deploystatic/README.docker | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tools/deploystatic/Dockerfile create mode 100644 tools/deploystatic/README.docker diff --git a/tools/deploystatic/Dockerfile b/tools/deploystatic/Dockerfile new file mode 100644 index 00000000..9fc53261 --- /dev/null +++ b/tools/deploystatic/Dockerfile @@ -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 index 00000000..0e2df5c0 --- /dev/null +++ b/tools/deploystatic/README.docker @@ -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)