This repository has been archived by the owner on Apr 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
54 lines (41 loc) · 1.48 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
git \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends yarn \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends python-pygments \
software-properties-common \
python-software-properties \
&& rm -rf /var/lib/apt/lists/*
RUN add-apt-repository ppa:longsleep/golang-backports \
&& apt-get update \
&& apt-get install -y --no-install-recommends golang-go \
&& rm -rf /var/lib/apt/lists/*
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN go get -u github.com/kardianos/govendor \
&& govendor get github.com/spf13/hugo
RUN cd /go/src/github.com/spf13/hugo \
&& make install
RUN mkdir /usr/share/src
WORKDIR /usr/share/src
# Expose default hugo port
EXPOSE 1313
# By default, serve site
CMD yarn && yarn run build && yarn run buildIndex