-
Notifications
You must be signed in to change notification settings - Fork 89
/
Dockerfile.in
57 lines (48 loc) · 2.83 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:rhel_9_golang_1.20)
FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.20.3-202306041558.el9.gee76e36 AS builder
ENV BUILD_VERSION=${CI_CONTAINER_VERSION}
ENV OS_GIT_MAJOR=${CI_X_VERSION}
ENV OS_GIT_MINOR=${CI_Y_VERSION}
ENV OS_GIT_PATCH=${CI_Z_VERSION}
ENV SOURCE_GIT_COMMIT=${CI_ELASTICSEARCH_OPERATOR_UPSTREAM_COMMIT}
ENV SOURCE_GIT_URL=${CI_ELASTICSEARCH_OPERATOR_UPSTREAM_URL}
## EXCLUDE BEGIN ##
ENV REMOTE_SOURCE=${REMOTE_SOURCE}/app
## EXCLUDE END ##
WORKDIR /go/src/github.com/openshift/elasticsearch-operator
COPY ${REMOTE_SOURCE}/apis apis
COPY ${REMOTE_SOURCE}/controllers controllers
COPY ${REMOTE_SOURCE}/files files
COPY ${REMOTE_SOURCE}/internal internal
COPY ${REMOTE_SOURCE}/bundle bundle
COPY ${REMOTE_SOURCE}/version version
COPY ${REMOTE_SOURCE}/.bingo ./.bingo
ADD ${REMOTE_SOURCE}/Makefile ${REMOTE_SOURCE}/main.go ${REMOTE_SOURCE}/go.mod ${REMOTE_SOURCE}/go.sum ./
RUN make build
#@follow_tag(registry.redhat.io/ubi9:latest)
FROM registry.redhat.io/ubi9:latest
LABEL \
io.k8s.display-name="OpenShift elasticsearch-operator" \
io.k8s.description="This is the component that manages an Elasticsearch cluster on a kubernetes based platform" \
io.openshift.tags="openshift,logging,elasticsearch" \
com.redhat.delivery.appregistry="false" \
License="Apache-2.0" \
maintainer="AOS Logging <aos-logging@redhat.com>" \
name="openshift-logging/elasticsearch-rhel8-operator" \
com.redhat.component="elasticsearch-operator-container" \
io.openshift.maintainer.product="OpenShift Container Platform" \
io.openshift.build.commit.id=${CI_ELASTICSEARCH_OPERATOR_UPSTREAM_COMMIT} \
io.openshift.build.source-location=${CI_ELASTICSEARCH_OPERATOR_UPSTREAM_URL} \
io.openshift.build.commit.url=${CI_ELASTICSEARCH_OPERATOR_UPSTREAM_URL}/commit/${CI_ELASTICSEARCH_OPERATOR_UPSTREAM_COMMIT} \
version=${CI_CONTAINER_VERSION}
ENV ALERTS_FILE_PATH="/etc/elasticsearch-operator/files/prometheus_alerts.yml"
ENV RULES_FILE_PATH="/etc/elasticsearch-operator/files/prometheus_recording_rules.yml"
ENV ES_DASHBOARD_FILE="/etc/elasticsearch-operator/files/dashboards/logging-dashboard-elasticsearch.json"
ENV RUNBOOK_BASE_URL="https://docs.openshift.com/container-platform/latest/logging/troubleshooting/cluster-logging-troubleshooting-for-critical-alerts.html"
COPY --from=builder /go/src/github.com/openshift/elasticsearch-operator/bin/elasticsearch-operator /usr/bin/
COPY --from=builder /go/src/github.com/openshift/elasticsearch-operator/files/ /etc/elasticsearch-operator/files/
COPY --from=builder /go/src/github.com/openshift/elasticsearch-operator/bundle /bundle
RUN mkdir /tmp/ocp-eo && \
chmod og+w /tmp/ocp-eo
WORKDIR /usr/bin
ENTRYPOINT ["elasticsearch-operator"]