提交 73fddc25 编写于 作者: F freesky-edward 提交者: Gitee

更新 Dockerfile

上级 f6455dd1
FROM nginx
FROM alpine:latest
MAINTAINER Edward Lee <freesky.edward@gmail.com> MAINTAINER Edward Lee <freesky.edward@gmail.com>
RUN apk add --no-cache \ RUN apt-get update && \
curl \ apt install curl -y
git \
openssh-client \
rsync \
build-base \
libc6-compat
ENV HUGO_VERSION=0.56.3 ENV HUGO_VERSION=0.56.3
RUN mkdir -p /usr/local/src && \ RUN mkdir -p /usr/local/src && \
cd /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 && \ 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/ && \ mv hugo /usr/local/bin/
addgroup -Sg 1000 hugo && \
adduser -Sg hugo -u 1000 -h /src hugo
COPY . /src/ COPY . /src/
RUN cd /src/ && /usr/local/bin/hugo -b / && \
cp -rf /src/public/* /usr/share/nginx/html/ && \
chmod -R 755 /usr/share/nginx/html
RUN cd /src/ && /usr/local/bin/hugo ENV RUN_USER nginx
ENV RUN_GROUP nginx
WORKDIR /src
EXPOSE 80 EXPOSE 80
ENTRYPOINT nginx -g "daemon off;"
# ENTRYPOINT ["hugo", "server", "--bind","0.0.0.0","-p","1313","--baseURL","http://49.4.95.151/"]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册