-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Place operator binaries in separate images
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
- Loading branch information
1 parent
053fc86
commit 05daeef
Showing
7 changed files
with
116 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# (first line comment needed for DOCKER_BUILDKIT use) | ||
# | ||
FROM docker.io/library/golang:1.14.3 as builder | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="maintainer@cilium.io" | ||
|
||
ADD . /go/src/github.com/cilium/cilium | ||
|
||
WORKDIR /go/src/github.com/cilium/cilium/operator | ||
ARG NOSTRIP | ||
ARG LOCKDEBUG | ||
RUN make NOSTRIP=$NOSTRIP LOCKDEBUG=$LOCKDEBUG cilium-operator-aws | ||
|
||
FROM docker.io/library/alpine:3.9.3 as certs | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
RUN apk --update add ca-certificates | ||
|
||
FROM scratch | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="maintainer@cilium.io" | ||
COPY --from=builder /go/src/github.com/cilium/cilium/operator/cilium-operator-aws /usr/bin/cilium-operator-aws | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
WORKDIR / | ||
CMD ["/usr/bin/cilium-operator-aws"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# (first line comment needed for DOCKER_BUILDKIT use) | ||
# | ||
FROM docker.io/library/golang:1.14.3 as builder | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="maintainer@cilium.io" | ||
|
||
ADD . /go/src/github.com/cilium/cilium | ||
|
||
WORKDIR /go/src/github.com/cilium/cilium/operator | ||
ARG NOSTRIP | ||
ARG LOCKDEBUG | ||
RUN make NOSTRIP=$NOSTRIP LOCKDEBUG=$LOCKDEBUG cilium-operator-azure | ||
|
||
FROM docker.io/library/alpine:3.9.3 as certs | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
RUN apk --update add ca-certificates | ||
|
||
FROM scratch | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="maintainer@cilium.io" | ||
COPY --from=builder /go/src/github.com/cilium/cilium/operator/cilium-operator-azure /usr/bin/cilium-operator-azure | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
WORKDIR / | ||
CMD ["/usr/bin/cilium-operator-azure"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# (first line comment needed for DOCKER_BUILDKIT use) | ||
# | ||
FROM docker.io/library/golang:1.14.3 as builder | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="maintainer@cilium.io" | ||
|
||
ADD . /go/src/github.com/cilium/cilium | ||
|
||
WORKDIR /go/src/github.com/cilium/cilium/operator | ||
ARG NOSTRIP | ||
ARG LOCKDEBUG | ||
RUN make NOSTRIP=$NOSTRIP LOCKDEBUG=$LOCKDEBUG cilium-operator-generic | ||
|
||
FROM docker.io/library/alpine:3.9.3 as certs | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
RUN apk --update add ca-certificates | ||
|
||
FROM scratch | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="maintainer@cilium.io" | ||
COPY --from=builder /go/src/github.com/cilium/cilium/operator/cilium-operator-generic /usr/bin/cilium-operator-generic | ||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
WORKDIR / | ||
CMD ["/usr/bin/cilium-operator-generic"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters