
# Copyright 2019 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ------------------------------------------------------------------------
#
# This is a Dockerfile for the rhpam-7/rhpam-rhel8-operator:7.8.0 image.

FROM ubi8:8-released

USER root

# Add scripts used to configure the image
COPY modules /tmp/scripts/

# Add all artifacts to the /tmp/artifacts directory
COPY \
    kie-cloud-operator.tar.gz \
    /tmp/artifacts/

# begin kie-cloud-operator:None

# Custom scripts
USER root
RUN [ "bash", "-x", "/tmp/scripts/kie-cloud-operator/install" ]

# end kie-cloud-operator:None
# begin rhpam-7/rhpam-rhel8-operator:7.8.0

# Environment variables
ENV \
    JBOSS_IMAGE_NAME="rhpam-7/rhpam-rhel8-operator" \
    JBOSS_IMAGE_VERSION="7.8.0" 

# Labels
LABEL \
      com.redhat.component="rhpam-7-rhel8-operator-container"  \
      description="Red Hat Business Automation Operator"  \
      io.cekit.version="3.2.1"  \
      io.k8s.description="Operator for deploying RHPAM & RHDM"  \
      io.k8s.display-name="Red Hat Business Automation Operator"  \
      io.openshift.tags="rhpam,rhdm,operator"  \
      maintainer="bsig-cloud@redhat.com"  \
      name="rhpam-7/rhpam-rhel8-operator"  \
      summary="Red Hat Business Automation Operator"  \
      version="7.8.0" 

# end rhpam-7/rhpam-rhel8-operator:7.8.0

USER root
RUN [ ! -d /tmp/scripts ] || rm -rf /tmp/scripts
RUN [ ! -d /tmp/artifacts ] || rm -rf /tmp/artifacts



# Run user
USER 1001

# Specify entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint"]
