Skip to content

Upgrade build image to use go 1.19 #4827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17.8-buster
FROM golang:1.19.0-buster
ARG goproxyValue
ENV GOPROXY=${goproxyValue}
RUN apt-get update && apt-get install -y curl python-requests python-yaml file jq unzip protobuf-compiler libprotobuf-dev && \
Expand All @@ -10,11 +10,6 @@ RUN apt-get install -y nodejs && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# and viceversa.
RUN npm install -g [email protected] [email protected]

ENV HUGO_VERSION=v0.94.3
RUN git clone https://github.com/alvinlin123/hugo.git --branch ${HUGO_VERSION} --depth 1 && \
cd hugo && go install --tags extended && cd ../ && \
rm -rf hugo/ && rm -rf /go/pkg /go/src /root/.cache

ENV SHFMT_VERSION=3.2.4
RUN GOARCH=$(go env GOARCH) && \
if [ "$GOARCH" = "amd64" ]; then \
Expand All @@ -28,17 +23,17 @@ RUN GOARCH=$(go env GOARCH) && \
chmod +x shfmt && \
mv shfmt /usr/bin

RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.27.0
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.48.0

RUN GO111MODULE=on go get \
github.com/client9/misspell/cmd/[email protected] \
github.com/golang/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] \
github.com/gogo/protobuf/[email protected] \
github.com/weaveworks/tools/cover@bdd647e92546027e12cdde3ae0714bb495e43013 \
github.com/fatih/faillint@v1.5.0 \
github.com/campoy/[email protected] \
&& rm -rf /go/pkg /go/src /root/.cache
ENV HUGO_VERSION=v0.101.0
RUN go install github.com/client9/misspell/cmd/[email protected] &&\
go install github.com/golang/protobuf/[email protected] &&\
go install github.com/gogo/protobuf/[email protected] &&\
go install github.com/weaveworks/tools/cover@bdd647e92546027e12cdde3ae0714bb495e43013 &&\
go install github.com/fatih/[email protected] &&\
go install github.com/campoy/embedmd@v1.0.0 &&\
go install --tags extended github.com/gohugoio/hugo@${HUGO_VERSION} &&\
rm -rf /go/pkg /go/src /root/.cache

ENV NODE_PATH=/usr/lib/node_modules
COPY build.sh /
Expand Down