Skip to content

Commit

Permalink
Update Go to 1.17.8; tidy build image
Browse files Browse the repository at this point in the history
Need to specify `-buster` otherwise libpcap gets unresolved symbols.

Add back a missing `&&` after installing packages, so temp files aren't
committed to the image.

Stop rebuilding various Go libraries since they are now cached
automatically for each different set of tags.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
  • Loading branch information
bboreham committed Mar 14, 2022
1 parent a774857 commit 87988e5
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16.2
FROM golang:1.17.8-buster
ENV SCOPE_SKIP_UI_ASSETS true
RUN set -eux; \
export arch_val="$(dpkg --print-architecture)"; \
Expand All @@ -7,22 +7,14 @@ RUN set -eux; \
apt-get install -y libpcap-dev time file shellcheck git gcc-arm-linux-gnueabihf curl build-essential gcc-s390x-linux-gnu; \
else \
apt-get install -y libpcap-dev time file shellcheck git curl build-essential; \
fi; \
\
fi && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN go clean -i net && \
go install -tags netgo std && \
export arch_val="$(dpkg --print-architecture)"; \
if [ "$arch_val" != "ppc64el" ] && [ "$arch_val" != "s390x" ]; then \
go install -race -tags netgo std; \
fi; \
go get -tags netgo \
RUN go get -tags netgo \
github.com/fzipp/gocyclo \
golang.org/x/lint/golint \
github.com/kisielk/errcheck \
github.com/client9/misspell/cmd/misspell && \
chmod a+wr --recursive /usr/local/go && \
rm -rf /go/pkg/ /go/src/

# Only install shfmt on amd64, as the version v1.3.0 isn't supported for ppc64le
Expand Down

0 comments on commit 87988e5

Please sign in to comment.