This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
/
index.Dockerfile
31 lines (23 loc) · 1.58 KB
/
index.Dockerfile
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
FROM registry.ci.openshift.org/origin/__OCP_MAX_VERSION__:operator-registry AS opm
FROM registry.access.redhat.com/ubi9/ubi-minimal as builder
COPY --from=opm /bin/opm /bin/opm
# Copy declarative config root into image at /configs
COPY olm-catalog/serverless-operator/index/configs /configs
RUN /bin/opm init serverless-operator --default-channel=__DEFAULT_CHANNEL__ --output yaml >> /configs/index.yaml
RUN /bin/opm render --skip-tls-verify -o yaml registry.ci.openshift.org/knative/openshift-serverless-v__PREVIOUS_REPLACES__:serverless-bundle \
registry.ci.openshift.org/knative/openshift-serverless-v__PREVIOUS_VERSION__:serverless-bundle \
registry.ci.openshift.org/knative/openshift-serverless-v__VERSION__:serverless-bundle >> /configs/index.yaml || \
/bin/opm render --skip-tls-verify -o yaml registry.ci.openshift.org/knative/openshift-serverless-v__PREVIOUS_REPLACES__:serverless-bundle \
registry.ci.openshift.org/knative/openshift-serverless-v__PREVIOUS_VERSION__:serverless-bundle \
registry.ci.openshift.org/knative/serverless-bundle:main >> /configs/index.yaml
# The base image is expected to contain
# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe
FROM registry.ci.openshift.org/origin/__OCP_MAX_VERSION__:operator-registry
# Copy declarative config root into image at /configs
COPY --from=builder /configs /configs
# Set DC-specific label for the location of the DC root directory
# in the image
LABEL operators.operatorframework.io.index.configs.v1=/configs
# Configure the entrypoint and command
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs"]