Skip to content

Commit

Permalink
Dockerfile.builder: use go get path@version syntax to download ineffa…
Browse files Browse the repository at this point in the history
…ssign

Also clean the Go build and module download caches to reduce the
container image size.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  • Loading branch information
tklauser authored and joestringer committed Apr 2, 2020
1 parent e051e15 commit ad9ccef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM quay.io/cilium/cilium-envoy:a3385205ad620550b35d3b0b651e40898386e6e3 as cil
# versions to be built while allowing the new versions to make changes
# that are not backwards compatible.
#
FROM quay.io/cilium/cilium-builder:2020-03-21 as builder
FROM quay.io/cilium/cilium-builder:2020-04-02 as builder
LABEL maintainer="maintainer@cilium.io"
WORKDIR /go/src/github.com/cilium/cilium
COPY . ./
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ENV GO_VERSION 1.14.1
#
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
apt-utils \
binutils \
ca-certificates \
Expand Down Expand Up @@ -53,7 +53,5 @@ RUN apt-get update \
# Install Go
#
RUN curl -sfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -xzC /usr/local && \
go get -d -u github.com/gordonklaus/ineffassign && \
cd /go/src/github.com/gordonklaus/ineffassign && \
git checkout -b 1003c8bd00dc2869cb5ca5282e6ce33834fed514 1003c8bd00dc2869cb5ca5282e6ce33834fed514 && \
go install
GO111MODULE=on go get github.com/gordonklaus/ineffassign@1003c8bd00dc2869cb5ca5282e6ce33834fed514 && \
go clean -cache -modcache
2 changes: 1 addition & 1 deletion test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
command: "etcd -name etcd0 -advertise-client-urls http://0.0.0.0:4002 -listen-client-urls http://0.0.0.0:4002 -initial-cluster-token etcd-cluster-1 -initial-cluster-state new"
privileged: true
base_image:
image: "quay.io/cilium/cilium-builder:2020-02-26"
image: "quay.io/cilium/cilium-builder:2020-04-02"
volumes:
- "./../:/go/src/github.com/cilium/cilium/"
privileged: true
Expand Down

0 comments on commit ad9ccef

Please sign in to comment.