From 86fecfc4dde68b16529e353eb603bbc87af7ca28 Mon Sep 17 00:00:00 2001 From: gidsi Date: Thu, 14 Dec 2017 22:20:41 +0100 Subject: [PATCH] shrink docker image size --- docker/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 191cd8d..a97cd24 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,8 @@ -FROM jekyll/jekyll +from jekyll/jekyll as builder +add . /srv/jekyll +run mkdir /site +run whoami +run jekyll build --source /srv/jekyll --destination /tmp -ADD . /srv/jekyll -WORKDIR /srv/jekyll - -CMD jekyll serve -H 0.0.0.0 +from nginx:alpine +copy --from=builder /tmp /usr/share/nginx/html