From 8134fdf9badd31f017198e0b958dd555507034fc Mon Sep 17 00:00:00 2001 From: liuyanglinux Date: Wed, 20 Dec 2023 06:54:47 +0000 Subject: [PATCH 1/3] update Dockerfile Signed-off-by: liuyanglinux --- Dockerfile | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index b23209c..13f6bb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,11 @@ -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 -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/ +COPY /src/website/public/ /usr/share/nginx/html/ RUN chown nginx:nginx -R /usr/share/nginx/html COPY ./deploy/nginx.conf /etc/nginx/nginx.conf -- Gitee From 864aae30ef0843e2dcb2013f8c3c1868a7fc0382 Mon Sep 17 00:00:00 2001 From: liuyanglinux Date: Thu, 21 Dec 2023 01:13:48 +0000 Subject: [PATCH 2/3] update Dockerfile. Signed-off-by: liuyanglinux --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 13f6bb6..11889bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,10 @@ FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx-hugo:1.24.0- COPY . /src/website/ RUN cd /src/website/ \ - && hugo -b / --minify + && hugo -b / --minify \ + && cp /src/website/public/* /usr/share/nginx/html/ \ + && chown nginx:nginx -R /usr/share/nginx/html -COPY /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 \ -- Gitee From 485be2175a80893d25ed3521695b5a6582722bc4 Mon Sep 17 00:00:00 2001 From: liuyanglinux Date: Thu, 21 Dec 2023 01:16:28 +0000 Subject: [PATCH 3/3] update Dockerfile. Signed-off-by: liuyanglinux --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 11889bf..dcc9c66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY . /src/website/ RUN cd /src/website/ \ && hugo -b / --minify \ - && cp /src/website/public/* /usr/share/nginx/html/ \ + && cp -r /src/website/public/* /usr/share/nginx/html/ \ && chown nginx:nginx -R /usr/share/nginx/html COPY ./deploy/nginx.conf /etc/nginx/nginx.conf -- Gitee