From 2b04dfb4c500361b09e3ac6fb7940898b01a069a Mon Sep 17 00:00:00 2001 From: Patrick Werner Date: Wed, 12 Feb 2020 22:41:07 +0100 Subject: [PATCH] add Dockerfile and README.md --- Dockerfile | 6 ++++++ README.md | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..47dc0ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.8.1-buster +RUN apt update && apt upgrade -y +RUN pip install pelican==4.2.0 +WORKDIR /site +RUN mkdir -p /site-generated +ENTRYPOINT ["pelican", "-Dr", "-o", "/site-generated"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ab40de4 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Docker image with [Pelican](https://blog.getpelican.com/) + +Create a volume for the output files. +``` +docker volume create pelican_files +``` +Run the pelican build with your site, replace `` with the directory of your Pelican source files. The output will be written into the previously created volume `pelican_files`. Changes are regenerated automatically. +``` +docker run --detach \ +--name=pelican \ +--volume :/site \ +--volume pelican_files:/site-generated \ +boonto/pelican:3.8.1-4.2.0 +``` +May be used in conjunction with the [nginx](https://hub.docker.com/_/nginx) container to serve the output. +``` +docker run --detach \ +--name=site \ +--volume pelican_files:/usr/share/nginx/html:ro \ +nginx +```