dockerfile: optimise RUN,WORKDIR,COPY instructions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f3136006d9
commit
373df9f4da
@ -1,15 +1,14 @@
|
|||||||
FROM docker.io/immawanderer/alpine-hugo:hugo-v0.103.0 AS hugobuild
|
FROM docker.io/immawanderer/alpine-hugo:hugo-v0.103.0 AS hugobuild
|
||||||
RUN mkdir -pv /docs
|
|
||||||
COPY . /docs
|
|
||||||
|
|
||||||
WORKDIR /docs
|
WORKDIR /docs
|
||||||
|
|
||||||
|
COPY . /docs
|
||||||
|
|
||||||
RUN git submodule init \
|
RUN git submodule init \
|
||||||
&& git submodule update --recursive \
|
&& git submodule update --recursive \
|
||||||
&& hugo version
|
&& hugo version \
|
||||||
RUN hugo --minify --gc=true
|
&& hugo --minify --gc=true
|
||||||
|
|
||||||
# WORKDIR /
|
|
||||||
|
|
||||||
FROM nginx:mainline-alpine
|
FROM nginx:mainline-alpine
|
||||||
# COPY --from=hugobuild /home/$(whoami)/public/ /usr/share/nginx/html
|
# COPY --from=hugobuild /home/$(whoami)/public/ /usr/share/nginx/html
|
||||||
|
Loading…
Reference in New Issue
Block a user