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"]
-CMD ["/source", "/target"]
\ No newline at end of file
+ADD deploystatic.py entrypoint.sh /
+EXPOSE 9099
+ENTRYPOINT ["/entrypoint.sh"]
docker build -t deploystatic .
-And then to use it:
+To use this container to deploy to a static directory, use:
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)
-You can also just specify the default parameters as docker arguments.
\ No newline at end of file
+You can also just specify the default parameters as docker arguments.
+
+
+You can also use the docker container to run a simple static webserver with
+the output of the static directory like this:
+
+docker run -it --rm -v `pwd`:/source -p 9099:9099 deploystatic -serve
+
+This will deploy the current directory inside the container and start a webserver
+on port 9099.
\ No newline at end of file