forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hubble-relay.Dockerfile
39 lines (35 loc) · 1.21 KB
/
hubble-relay.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# (first line comment needed for DOCKER_BUILDKIT use)
#
ARG BASE_IMAGE=scratch
FROM docker.io/library/golang:1.15.3 as builder
ARG CILIUM_SHA=""
LABEL cilium-sha=${CILIUM_SHA}
ADD . /go/src/github.com/cilium/cilium
WORKDIR /go/src/github.com/cilium/cilium/hubble-relay
ARG NOSTRIP
ARG LOCKDEBUG
ARG RACE
RUN make RACE=${RACE} NOSTRIP=${NOSTRIP} LOCKDEBUG=${LOCKDEBUG}
FROM docker.io/library/alpine:3.12.0 as certs
ARG CILIUM_SHA=""
LABEL cilium-sha=${CILIUM_SHA}
RUN apk --update add ca-certificates
FROM docker.io/library/golang:1.15.3 as gops
ARG CILIUM_SHA=""
LABEL cilium-sha=${CILIUM_SHA}
RUN go get -d github.com/google/gops && \
cd /go/src/github.com/google/gops && \
git checkout -b v0.3.10 v0.3.10 && \
git --no-pager remote -v && \
git --no-pager log -1 && \
CGO_ENABLED=0 go install && \
strip /go/bin/gops
FROM ${BASE_IMAGE}
ARG CILIUM_SHA=""
LABEL cilium-sha=${CILIUM_SHA}
LABEL maintainer="maintainer@cilium.io"
COPY --from=builder /go/src/github.com/cilium/cilium/hubble-relay/hubble-relay /usr/bin/hubble-relay
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=gops /go/bin/gops /bin/gops
ENTRYPOINT ["/usr/bin/hubble-relay"]
CMD ["serve"]