3
0
Fork 0
website/Dockerfile

21 lines
508 B
Docker
Raw Normal View History

2018-09-07 15:11:20 +08:00
FROM node:10-alpine as build
2018-10-28 12:22:21 +08:00
RUN apk add --no-cache git=2.18.1-r0 curl=7.61.1-r0
2018-09-07 15:11:20 +08:00
ARG hugo_version=0.48
2018-09-11 19:06:36 +08:00
RUN curl -fsSLO --compressed https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_${hugo_version}_Linux-64bit.tar.gz
RUN tar -xf hugo_${hugo_version}_Linux-64bit.tar.gz -C /tmp
2018-09-07 15:11:20 +08:00
RUN mv /tmp/hugo /usr/local/bin/hugo
WORKDIR /web
COPY . .
RUN yarn install
RUN yarn build
RUN hugo
FROM productionwentdown/caddy:0.11.0
COPY --from=build /web/public /srv
COPY Caddyfile /etc/Caddyfile