From 373df9f4da3a830f82c8f8da10ff769493337250 Mon Sep 17 00:00:00 2001 From: surtur Date: Sat, 24 Sep 2022 21:08:27 +0300 Subject: [PATCH] dockerfile: optimise RUN,WORKDIR,COPY instructions --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb4b6f7..1e4c02d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,14 @@ FROM docker.io/immawanderer/alpine-hugo:hugo-v0.103.0 AS hugobuild -RUN mkdir -pv /docs -COPY . /docs WORKDIR /docs -RUN git submodule init \ -&& git submodule update --recursive \ -&& hugo version -RUN hugo --minify --gc=true +COPY . /docs + +RUN git submodule init \ + && git submodule update --recursive \ + && hugo version \ + && hugo --minify --gc=true -# WORKDIR / FROM nginx:mainline-alpine # COPY --from=hugobuild /home/$(whoami)/public/ /usr/share/nginx/html