aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Dockerfile.project
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-05-05 02:07:32 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-05-05 02:07:32 +0300
commit8a13ff2c6821643e8df08cc0d7731e4b938e9edb (patch)
treea685a5ea1443acdf0847ca5ff57159b472382b69 /Dockerfile.project
parentUPPERCASE user-facing parameters (diff)
downloadjekyll-docker-8a13ff2c6821643e8df08cc0d7731e4b938e9edb.tar.gz
jekyll-docker-8a13ff2c6821643e8df08cc0d7731e4b938e9edb.zip
enable out-of-tree builds
This directory must not be a subdirectory of the Jekyll project anymore. The hacks I had to put in place for this will be documented in the next commit.
Diffstat (limited to 'Dockerfile.project')
-rw-r--r--Dockerfile.project10
1 files changed, 10 insertions, 0 deletions
diff --git a/Dockerfile.project b/Dockerfile.project
new file mode 100644
index 0000000..fd74035
--- /dev/null
+++ b/Dockerfile.project
@@ -0,0 +1,10 @@
+FROM jekyll_base
+
+ENV PROJECT_DIR="/project"
+RUN sudo mkdir -p -- "$PROJECT_DIR" && \
+ sudo chown -- "$JEKYLL_USER:$JEKYLL_USER" "$PROJECT_DIR"
+COPY --chown="$JEKYLL_USER:$JEKYLL_USER" ["Gemfile", "Gemfile.lock", "$PROJECT_DIR/"]
+RUN make dependencies
+
+COPY --chown="$JEKYLL_USER:$JEKYLL_USER" [".", "$PROJECT_DIR/"]
+CMD make jekyll/serve