-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile.in
43 lines (35 loc) · 1.9 KB
/
Dockerfile.in
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
40
41
42
43
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:rhel_8_golang_1.18)
FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.18.4-202207291631.el8.g2ee6935 AS builder
ENV BUILD_VERSION=1.1.0
ENV OS_GIT_MAJOR=1
ENV OS_GIT_MINOR=1
ENV OS_GIT_PATCH=0
ENV SOURCE_GIT_COMMIT=${CI_LOG_FILE_METRIC_EXPORTER_UPSTREAM_COMMIT}
ENV SOURCE_GIT_URL=${CI_LOG_FILE_METRIC_EXPORTER_UPSTREAM_URL}
ENV REMOTE_SOURCE=${REMOTE_SOURCE:-.}
## EXCLUDE BEGIN ##
ENV REMOTE_SOURCE=${REMOTE_SOURCE}/app
## EXCLUDE END ##
USER 0
WORKDIR /go/src/github.com/log-file-metric-exporter
COPY ${REMOTE_SOURCE} .
RUN make build
#@follow_tag(registry.redhat.io/ubi8:latest)
FROM registry.redhat.io/ubi8:8.4-209
COPY --from=builder /go/src/github.com/log-file-metric-exporter/bin/log-file-metric-exporter /usr/local/bin/.
COPY --from=builder /go/src/github.com/log-file-metric-exporter/hack/log-file-metric-exporter.sh /usr/local/bin/.
RUN chmod +x /usr/local/bin/log-file-metric-exporter
RUN chmod +x /usr/local/bin/log-file-metric-exporter.sh
LABEL \
io.k8s.display-name="OpenShift LogFileMetric Exporter" \
io.k8s.description="OpenShift LogFileMetric Exporter component of OpenShift Cluster Logging" \
License="Apache-2.0" \
name="openshift-logging/log-file-metric-exporter-rhel8" \
com.redhat.component="log-file-metric-exporter-container" \
io.openshift.maintainer.product="OpenShift Container Platform" \
io.openshift.maintainer.component="Logging" \
io.openshift.build.commit.id=${CI_LOG_FILE_METRIC_EXPORTER_UPSTREAM_COMMIT} \
io.openshift.build.source-location=${CI_LOG_FILE_METRIC_EXPORTER_UPSTREAM_URL} \
io.openshift.build.commit.url=${CI_LOG_FILE_METRIC_EXPORTER_UPSTREAM_URL}/commit/${CI_LOG_FILE_METRIC_EXPORTER_UPSTREAM_COMMIT} \
version=v1.1.0
CMD ["sh", "-c", "/usr/local/bin/log-file-metric-exporter.sh"]