-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 857 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# FROM alpine:3.10 as build
FROM node:8.16.0-stretch as build
ENV HUGO_VERSION 0.55.6
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
# ENV HUGO_BINARY hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
WORKDIR /app
RUN set -x && \
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} && \
tar xzf ${HUGO_BINARY} && \
rm -r ${HUGO_BINARY} && \
mv hugo /usr/bin
COPY ./ /site
WORKDIR /site
# Change from runningit.se to localhost
# RUN cat config.toml|head -5 |sed 's/https:\/\/runningit.se/localhost/g' > config.toml
RUN git submodule update --init --recursive
# RUN npm install
# RUN npm run build
RUN hugo -t hugo-coder -d public
FROM nginx:alpine
COPY nginx_default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /site/public /usr/share/nginx/html/
WORKDIR /usr/share/nginx/html/