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

更新 Dockerfile

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