trying a different method of building
This commit is contained in:
+9
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user