3
0
Fork 0
website/Dockerfile

21 lines
489 B
Docker
Raw Permalink Normal View History

2018-09-07 15:11:20 +08:00
FROM node:10-alpine as build
2019-03-24 22:29:46 +08:00
RUN apk add --no-cache git curl
2018-09-07 15:11:20 +08:00
2019-10-02 01:04:44 +08:00
ARG hugo_version=0.58.3
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
2019-10-02 01:04:44 +08:00
FROM productionwentdown/caddy:1.0.3
2018-09-07 15:11:20 +08:00
COPY --from=build /web/public /srv
COPY Caddyfile /etc/Caddyfile