|
| 1 | +# Copyright 2021 Red Hat |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +# ------------------------------------------------------------------------ |
| 16 | + |
| 17 | +FROM registry.access.redhat.com/ubi9/nodejs-22:9.5-1734528986 AS builder |
| 18 | + |
| 19 | +USER root |
| 20 | + |
| 21 | +# Install Yarn |
| 22 | +RUN npm install --global yarn |
| 23 | + |
| 24 | +COPY ["package.json", "yarn.lock", "./"] |
| 25 | + |
| 26 | +RUN yarn install --no-progress --non-interactive |
| 27 | + |
| 28 | +ADD . /usr/src/app |
| 29 | +WORKDIR /usr/src/app |
| 30 | + |
| 31 | +RUN yarn install --network-timeout 600000 && \ |
| 32 | + yarn cache clean |
| 33 | + |
| 34 | +RUN yarn install --no-progress --non-interactive |
| 35 | + |
| 36 | +COPY [".", "."] |
| 37 | + |
| 38 | +RUN yarn build |
| 39 | + |
| 40 | +#################################################################################################### |
| 41 | + |
| 42 | +FROM --platform=linux/amd64 registry.redhat.io/ubi9/httpd-24:9.5-1733127463 |
| 43 | +USER root |
| 44 | +RUN chown -R 1001:0 /opt/app-root/src |
| 45 | +USER 1001 |
| 46 | +RUN chmod g+rwx /opt/app-root/src |
| 47 | + |
| 48 | +COPY --from=builder /usr/src/app/ssl.conf /etc/httpd/conf.d |
| 49 | +COPY --from=builder /usr/src/app/dist /var/www/html/plugin |
| 50 | + |
| 51 | +CMD run-httpd |
| 52 | + |
| 53 | +LABEL \ |
| 54 | + name="openshift-gitops-1/gitops-console-plugin-rhel8" \ |
| 55 | + License="Apache 2.0" \ |
| 56 | + com.redhat.component="openshift-gitops-console-plugin-container" \ |
| 57 | + com.redhat.delivery.appregistry="false" \ |
| 58 | + release=${CI_CONTAINER_RELEASE} \ |
| 59 | + upstream-vcs-type="git" \ |
| 60 | + upstream-version=${CI_UPSTREAM_VERSION} \ |
| 61 | + upstream-vcs-ref="${COMMIT_SHA}" \ |
| 62 | + version=${CI_CONTAINER_VERSION} \ |
| 63 | + summary="Red Hat OpenShift GitOps Console Plugin" \ |
| 64 | + maintainer="William Tam < [email protected]>" \ |
| 65 | + io.openshift.tags="openshift,gitops-console-plugin" \ |
| 66 | + io.k8s.display-name="Red Hat OpenShift GitOps Console Plugin" \ |
| 67 | + io.k8s.description="Red Hat OpenShift GitOps Console Plugin" \ |
| 68 | + io.openshift.maintainer.product="Red Hat OpenShift GitOps" \ |
| 69 | + io.openshift.maintainer.component="William Tam < [email protected]>" \ |
| 70 | + description="Red Hat OpenShift GitOps Console Plugin" |
| 71 | + |
| 72 | + |
0 commit comments