trying a different method of building

This commit is contained in:
AHMZA
2022-02-23 22:09:56 +00:00
parent 348a27761a
commit ea2b02e357
2 changed files with 15 additions and 35 deletions
+9 -5
View File
@@ -1,7 +1,11 @@
FROM alpine as Builder
RUN apk update && apk add curl git
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.92.2/hugo_0.92.2_Linux-ARM64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
RUN git clone --recurse-submodules https://gitlab.com/AHMZA/blog.git
WORKDIR blog
RUN hugo --minify
FROM nginx
WORKDIR /usr/share/nginx/html
RUN rm -r /usr/share/nginx/html/index.html
COPY ./public /usr/share/nginx/html
RUN ls
RUN cat index.html
COPY --from=Builder /blog/nginx.conf /etc/nginx/nginx.conf
COPY --from=Builder /blog/public/ /usr/share/nginx/html
EXPOSE 80