浏览代码

Add dockerfile

pull/1/head
Rohan Verma 6 年前
父节点
当前提交
43b9d0065b
共有 1 个文件被更改,包括 23 次插入0 次删除
  1. +23
    -0
      Dockerfile

+ 23
- 0
Dockerfile 查看文件

@@ -0,0 +1,23 @@
FROM alpine:latest as build

ENV HUGO_VERSION 0.56.0
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.tar.gz

# Install Hugo
RUN set -x && \
apk add --update wget ca-certificates git && \
wget https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} && \
tar xzf ${HUGO_BINARY} && \
rm -r ${HUGO_BINARY} && \
mv hugo /usr/bin

COPY ./ /site

WORKDIR /site

RUN /usr/bin/hugo --gc --minify --enableGitInfo

FROM nginx:alpine

COPY --from=build /site/public /usr/share/nginx/html


正在加载...
取消
保存