From 030f857f1561fd0fcc9dc2d296013d9aa04965ea Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Mon, 22 Apr 2019 12:24:21 +0200 Subject: [PATCH] Implement docker build --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8abd747 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM plugins/hugo as build +WORKDIR /usr/src/build +COPY ./ ./ +RUN apk --no-cache add --update make +RUN /bin/drone-hugo && \ + make -C public/ -f ../Makefile + # find ./ -type f \( \ + # -name "*.html" \ + # -o -name "*.js" \ + # -o -name "*.css" \ + # -o -name "*.xml" \ + # -o -name "*.json" \ + # -o -name "*.txt" \ + # -o -name "*.png" \ + # -o -name "*.ico" \ + # -o -name "*.svg" \ + # -not -name "*.gz" \) \ + # -exec gzip -v -k -9 "{}" \; + + +# Stage: Run + +FROM nginx:alpine +WORKDIR /usr/share/nginx/html +COPY --from=build /usr/src/build/public ./ +EXPOSE 80