From 58f3d9cbc05cfb0b88085e99acbff6399d4e85d0 Mon Sep 17 00:00:00 2001 From: James McDonald Date: Fri, 8 May 2020 12:10:30 +0200 Subject: [PATCH] Add experimental Dockerfile Currently the Dockerfile is not used for the build. --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7b465dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM debian AS builder + +RUN apt-get update \ + && apt-get install -y curl jq \ + && URL=$(curl -sS -H 'Accept: appliction/vnd.github.v3+json' https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.assets[] | select(.name | test("hugo_[^e].*Linux-64bit.tar.gz")) | .browser_download_url') \ + && curl -sSL -o hugo.tar.gz $URL \ + && tar -C /usr/local/bin -xf hugo.tar.gz hugo + +COPY . /site + +WORKDIR /site + +RUN hugo + +FROM nginx + +COPY --from=builder /site/public/ /usr/share/nginx/html