forked from openshift/kube-rbac-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ocp
22 lines (19 loc) · 945 Bytes
/
Dockerfile.ocp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.9 AS builder
WORKDIR /go/src/github.com/brancz/kube-rbac-proxy
COPY . .
ENV GO111MODULE=on
# GOFLAGS is needed to build image without accessing external sources, mostly to comply with ART policies
ENV GOFLAGS="-mod=vendor"
RUN make build && \
cp _output/kube-rbac-proxy-$(go env GOOS)-$(go env GOARCH) _output/kube-rbac-proxy
FROM registry.ci.openshift.org/ocp/4.9:base
LABEL io.k8s.display-name="kube-rbac-proxy" \
io.k8s.description="This is a proxy, that can perform Kubernetes RBAC authorization." \
io.openshift.tags="openshift,kubernetes" \
summary="" \
maintainer="OpenShift Monitoring Team <[email protected]>"
ARG FROM_DIRECTORY=/go/src/github.com/brancz/kube-rbac-proxy
COPY --from=builder ${FROM_DIRECTORY}/_output/kube-rbac-proxy /usr/bin/kube-rbac-proxy
USER 65534
EXPOSE 8080
ENTRYPOINT ["/usr/bin/kube-rbac-proxy"]