Skip to content

Commit

Permalink
build: Simplify docker plugin & operator dockerfiles
Browse files Browse the repository at this point in the history
- remove unused `V` argument
- remove unused `PKG_BUILD` variable declaration
- `CGO_ENABLED=0` is now the default
- `GOOS=linux` is redundant
- `-a` is meaningless in contaniner build
- `-installsuffix cgo` was a red herring

Signed-off-by: Ilya Dmitrichenko <[email protected]>
  • Loading branch information
errordeveloper authored and joestringer committed Apr 16, 2020
1 parent 8b74e24 commit 6ecdf95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cilium-docker-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ LABEL maintainer="[email protected]"
ADD . /go/src/github.com/cilium/cilium
WORKDIR /go/src/github.com/cilium/cilium/plugins/cilium-docker
ARG LOCKDEBUG
ARG V
RUN make CGO_ENABLED=0 GOOS=linux LOCKDEBUG=$LOCKDEBUG PKG_BUILD=1 EXTRA_GOBUILD_FLAGS="-a -installsuffix cgo"
RUN make LOCKDEBUG=$LOCKDEBUG

FROM scratch
LABEL maintainer="[email protected]"
Expand Down
3 changes: 1 addition & 2 deletions cilium-operator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ LABEL maintainer="[email protected]"
ADD . /go/src/github.com/cilium/cilium
WORKDIR /go/src/github.com/cilium/cilium/operator
ARG LOCKDEBUG
ARG V
RUN make CGO_ENABLED=0 GOOS=linux LOCKDEBUG=$LOCKDEBUG PKG_BUILD=1 EXTRA_GOBUILD_FLAGS="-a -installsuffix cgo -tags operator_aws,operator_azure"
RUN make LOCKDEBUG=$LOCKDEBUG EXTRA_GOBUILD_FLAGS="-tags operator_aws,operator_azure"

FROM docker.io/library/alpine:3.9.3 as certs
RUN apk --update add ca-certificates
Expand Down

0 comments on commit 6ecdf95

Please sign in to comment.