File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM openshift/origin-base
2
-
3
- ENV GOPATH /go
4
- RUN mkdir $GOPATH
5
-
6
- COPY . $GOPATH/src/k8s.io/kube-state-metrics
7
-
8
- RUN yum install -y golang make git && \
9
- cd $GOPATH/src/k8s.io/kube-state-metrics && cat Makefile && \
10
- make build && cp $GOPATH/src/k8s.io/kube-state-metrics/kube-state-metrics /usr/bin/ && \
11
- yum autoremove -y golang make git && yum clean all
1
+ FROM registry.svc.ci.openshift.org/openshift/release:golang-1.10 AS builder
2
+ WORKDIR /go/src/k8s.io/kube-state-metrics
3
+ COPY . .
4
+ RUN make build
12
5
6
+ FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:base
13
7
LABEL io.k8s.display-name="kube-state-metrics" \
14
8
io.k8s.description="This is a component that exposes metrics about Kubernetes objects." \
15
9
io.openshift.tags="kubernetes" \
16
10
maintainer=
"Frederic Branczyk <[email protected] >"
17
11
18
- # doesn't require a root user.
19
- USER 1001
12
+ ARG FROM_DIRECTORY=/go/src/k8s.io/kube-state-metrics
13
+ COPY --from=builder ${FROM_DIRECTORY}/kube-state-metrics /usr/bin/kube-state-metrics
20
14
15
+ USER nobody
21
16
ENTRYPOINT ["/usr/bin/kube-state-metrics" ]
You can’t perform that action at this time.
0 commit comments