-
Notifications
You must be signed in to change notification settings - Fork 4
/
catalog.Dockerfile
53 lines (42 loc) · 1.81 KB
/
catalog.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM registry.redhat.io/openshift4/ose-operator-registry:v4.14 AS builder
FROM registry.redhat.io/ubi8/ubi-minimal
# Add label for location of Declarative Config root directory & required OpenShift labels
ARG VERSION_LABEL=1.4.1
ARG RELEASE_LABEL=XX
ARG VCS_REF=0123456789012345678901234567890123456789
ARG VCS_URL="https://github.com/WASdev/websphere-liberty-operator"
ARG NAME="websphere-liberty-operator-catalog"
ARG SUMMARY="WebSphere Liberty Operator Catalog"
ARG DESCRIPTION="This image contains the catalog for WebSphere Liberty Operator."
# Set DC-specific label for the location of the DC root directory in the image
LABEL operators.operatorframework.io.index.configs.v1=/configs \
name=$NAME \
vendor=IBM \
version=$VERSION_LABEL \
release=$RELEASE_LABEL \
description=$DESCRIPTION \
summary=$SUMMARY \
io.k8s.display-name=$SUMMARY \
io.k8s.description=$DESCRIPTION \
vcs-type=git \
vcs-ref=$VCS_REF \
vcs-url=$VCS_URL \
url=$VCS_URL
## Copy Apache license and notices
COPY --chown=1001:0 LICENSE NOTICES /licenses/
USER root
# Pick up any latest fixes
RUN microdnf update && microdnf clean all
# Copy required tooling, licenses, and declarative config into defined location
COPY --from=builder --chown=1001:0 /bin/opm /bin/opm
COPY --from=builder --chown=1001:0 /bin/grpc_health_probe /bin/grpc_health_probe
# Note: the COPY directive can also point to a directory structure and it will recurse thru the directory structure and use any yaml/json files it locates
COPY --chown=1001:0 catalog /configs
# Validate catalog file
RUN ["/bin/opm", "validate", "/configs"]
EXPOSE 50051
USER 1001
WORKDIR /tmp
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs", "--cache-dir=/tmp/cache"]
RUN ["/bin/opm", "serve", "/configs", "--cache-dir=/tmp/cache", "--cache-only"]