11# The opm image is expected to contain /bin/opm (with a serve subcommand) and /bin/grpc_health_probe
22ARG OPM_IMAGE=registry.redhat.io/openshift4/ose-operator-registry-rhel9:v4.18
3- ARG BUILDER_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23
4-
5- # build the catalog
6- FROM ${BUILDER_IMAGE} AS builder
7-
8- # create dir structure to generate the catalog
9- RUN mkdir -p /app/hack /app/.konflux/catalog
10- COPY Makefile /app
11- COPY .konflux/catalog/ /app/.konflux/catalog/
12- COPY telco5g-konflux /app/telco5g-konflux
13-
14- # we need to copy the vendor/ folder as the Makefile depends on it
15- COPY vendor/ /app/vendor/
16-
17- # generate the catalog
18-
19- # debug
20- RUN echo "root dir" && ls -lra $HOME
21-
22- WORKDIR /app
23- RUN --mount=type=secret,id=telco-5g-redhat-pull-secret/.dockerconfigjson \
24- mkdir -p $HOME/.docker/ && \
25- cp /run/secrets/telco-5g-redhat-pull-secret/.dockerconfigjson $HOME/.docker/config.json
26-
27- # debug
28- RUN echo "run secrets" && ls -lra /run/secrets/ && echo "docker dir" && ls -lra $HOME/.docker/ && cat $HOME/.docker/config.json
29-
30- ENV REGISTRY_AUTH_FILE=$HOME/.docker/config.json
31-
32- # The Konflux build is not hermetic so it will download the tools (opm, yq, etc) automatically
33- # Konflux will externally sync the submodules so we can skip it here
34- RUN SKIP_SUBMODULE_SYNC=yes make konflux-generate-catalog-production && \
35- rm -f $HOME/.docker/config.json
36-
373# run the catalog
384FROM ${OPM_IMAGE}
395
@@ -43,7 +9,7 @@ CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
439# ensure this correponds to olm.package name
4410ENV PACKAGE_NAME=topology-aware-lifecycle-manager
4511
46- COPY --from=builder /app/ .konflux/catalog/$PACKAGE_NAME/ /configs/$PACKAGE_NAME
12+ COPY .konflux/catalog/$PACKAGE_NAME/ /configs/$PACKAGE_NAME
4713# RUN ["/bin/opm", "validate", "/configs/topology-aware-lifecycle-manager"]
4814RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]
4915
0 commit comments