diff --git a/Dockerfile b/Dockerfile index b23209c27baac43b87b8efa3b3defd53a5a68e22..dcc9c66b8cd9bbfc5e682aebcf93fedd3d6b3baa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,12 @@ -FROM ubuntu:16.04 as builder +FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx-hugo:1.24.0-22.03-lts-sp1-0.104.3 -RUN apt -y update &&apt -y install curl COPY . /src/website/ -ENV HUGO_VERSION=0.104.3 -RUN mkdir -p /usr/local/src && \ - cd /usr/local/src && \ - curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xz && \ - mv hugo /usr/local/bin/ -RUN cd /src/website/ && hugo -b / --minify +RUN cd /src/website/ \ + && hugo -b / --minify \ + && cp -r /src/website/public/* /usr/share/nginx/html/ \ + && chown nginx:nginx -R /usr/share/nginx/html -FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:1.22.0-22.03-lts - -COPY --from=builder /src/website/public/ /usr/share/nginx/html/ -RUN chown nginx:nginx -R /usr/share/nginx/html COPY ./deploy/nginx.conf /etc/nginx/nginx.conf RUN touch /var/run/nginx.pid \