forked from decred/dcrweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (24 loc) · 874 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
33
34
35
# builder image
FROM alpine:latest
ARG HUGO_BASEURL
ENV HUGO_BASEURL ${HUGO_BASEURL:-https://decred.org}
ENV HUGO_VERSION 0.79.1
LABEL description="gohugo build"
LABEL version="1.0"
LABEL maintainer="[email protected]"
WORKDIR /tmp
RUN apk update && apk upgrade
RUN apk add --no-cache bash jq wget libc6-compat g++
RUN wget -q https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_extended_"$HUGO_VERSION"_Linux-64bit.tar.gz
RUN tar xz -C /usr/local/bin -f hugo_extended_"$HUGO_VERSION"_Linux-64bit.tar.gz
WORKDIR /root
COPY ./ /root/
RUN bin/build-hugo.sh
# final image
FROM nginx:1.18
LABEL description="dcrweb server"
LABEL version="1.0"
LABEL maintainer="[email protected]"
COPY conf/nginx.conf /etc/nginx/conf.d/default.conf
# /usr/share/nginx/html is also hardcoded in test/run-test.sh
COPY --from=0 /root/src/public/ /usr/share/nginx/html