Skip to content

Commit 0f3143d

Browse files
authored
Merge pull request #1858 from cyriltovena/website-build-image
Add tools to the build image to build the website
2 parents ed7c302 + f8fbb9d commit 0f3143d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

build-image/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
FROM golang:1.13.3-stretch
2-
RUN apt-get update && apt-get install -y python-requests python-yaml file jq unzip protobuf-compiler libprotobuf-dev && \
2+
RUN apt-get update && apt-get install -y curl python-requests python-yaml file jq unzip protobuf-compiler libprotobuf-dev && \
33
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4+
RUN curl -sL https://deb.nodesource.com/setup_6.x | sh -
5+
RUN apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
6+
RUN npm install -g postcss-cli autoprefixer
47
RUN go clean -i net && \
58
go install -tags netgo std && \
69
go install -race -tags netgo std
10+
ENV HUGO_VERSION=v0.59.1
11+
RUN git clone https://github.com/gohugoio/hugo.git --branch ${HUGO_VERSION} --depth 1 && \
12+
cd hugo && go install --tags extended && cd ../ && \
13+
rm -rf hugo/ && rm -rf /go/pkg /go/src
714
RUN curl -fsSLo shfmt https://github.com/mvdan/sh/releases/download/v1.3.0/shfmt_v1.3.0_linux_amd64 && \
815
echo "b1925c2c405458811f0c227266402cf1868b4de529f114722c2e3a5af4ac7bb2 shfmt" | sha256sum -c && \
916
chmod +x shfmt && \
@@ -19,6 +26,8 @@ RUN GO111MODULE=on go get -tags netgo \
1926
rm -rf /go/pkg /go/src
2027
RUN curl -Ls https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep && \
2128
chmod +x $GOPATH/bin/dep
29+
30+
ENV NODE_PATH=/usr/lib/node_modules
2231
COPY build.sh /
2332
ENV GOCACHE=/go/cache
2433
ENTRYPOINT ["/build.sh"]

0 commit comments

Comments
 (0)