-
Notifications
You must be signed in to change notification settings - Fork 615
/
Dockerfile.downloads
36 lines (26 loc) · 1.26 KB
/
Dockerfile.downloads
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
FROM quay.io/openshift/origin-cli-artifacts:4.18 AS origincli
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.18 AS gobuilder
ENV HOME=/go/src/github.com/openshift/console/
RUN mkdir -p ${HOME}
COPY go.mod go.sum build-downloads.sh ${HOME}
COPY vendor/ ${HOME}vendor/
COPY cmd/ /${HOME}cmd/
COPY .git/ /${HOME}.git/
WORKDIR ${HOME}
RUN ./build-downloads.sh
FROM registry.ci.openshift.org/ocp/4.18:base-rhel9
RUN mkdir -p /opt/downloads
COPY --from=gobuilder /go/src/github.com/openshift/console/bin/downloads /opt/downloads
COPY --from=gobuilder /go/src/github.com/openshift/console/cmd/downloads/config/defaultArtifactsConfig.yaml /opt/downloads
COPY --from=origincli /usr/share/openshift /usr/share/openshift
WORKDIR /
# doesn't require a root user.
USER 1001
CMD ["/opt/downloads/downloads", "--config-path=/opt/downloads/defaultArtifactsConfig.yaml"]
LABEL \
io.k8s.display-name="CLI Artifacts Downloads Server" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a Golang server that serves 'oc' binaries for various platforms." \
maintainer="Marek Ziska <[email protected]>" \
License="Apache 2.0" \
vendor="Red Hat" \
io.openshift.tags="openshift,cli-artifacts" \