Browse Source

Add dockerfile

pull/1/head
Rohan Verma 6 years ago
parent
commit
43b9d0065b
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      Dockerfile

+ 23
- 0
Dockerfile View File

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


Loading…
Cancel
Save