
# This is a Dockerfile for the rhpam-7/rhpam-rhel8-operator:7.10.0 image.

## START builder image builder:7.10.0
## \  
    FROM registry.redhat.io/ubi8/go-toolset:1.13.4 AS builder

    USER root

###### START module 'builder:1.0'
###### \
        # Copy 'builder' module content
        COPY modules/builder /tmp/scripts/builder
        # Custom scripts from 'builder' module
        USER root
        RUN [ "sh", "-x", "/tmp/scripts/builder/install" ]
###### /
###### END module 'builder:1.0'

###### START image 'builder:7.10.0'
###### \
        # Set 'builder' image defined environment variables
        ENV \
            JBOSS_IMAGE_NAME="rhpam-7/rhpam-rhel8-operator" \
            JBOSS_IMAGE_VERSION="7.10.0" 
        # Set 'builder' image defined labels
        LABEL \
            name="rhpam-7/rhpam-rhel8-operator"  \
            version="7.10.0" 
###### /
###### END image 'builder:7.10.0'

## /
## END builder image


## START target image rhpam-7/rhpam-rhel8-operator:7.10.0
## \
    FROM registry.redhat.io/ubi8-minimal

    USER root

###### START module 'runtime:1.0'
###### \
        # Copy 'runtime' module stage artifacts
        COPY --from=builder /usr/local/bin/kie-cloud-operator /usr/local/bin/kie-cloud-operator
        COPY --from=builder /usr/local/bin/console-cr-form /usr/local/bin/console-cr-form
        # Copy 'runtime' module content
        COPY modules/runtime /tmp/scripts/runtime
        # Custom scripts from 'runtime' module
        USER root
        RUN [ "sh", "-x", "/tmp/scripts/runtime/install" ]
###### /
###### END module 'runtime:1.0'

###### START image 'rhpam-7/rhpam-rhel8-operator:7.10.0'
###### \
        # Set 'rhpam-7/rhpam-rhel8-operator' image defined environment variables
        ENV \
            JBOSS_IMAGE_NAME="rhpam-7/rhpam-rhel8-operator" \
            JBOSS_IMAGE_VERSION="7.10.0" 
        # Set 'rhpam-7/rhpam-rhel8-operator' image defined labels
        LABEL \
            com.redhat.component="rhpam-7-rhel8-operator-container"  \
            description="Red Hat Business Automation Operator"  \
            io.cekit.version="3.8.0"  \
            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.10.0" 
###### /
###### END image 'rhpam-7/rhpam-rhel8-operator:7.10.0'


    # Switch to 'root' user and remove artifacts and modules
    USER root
    RUN [ ! -d /tmp/scripts ] || rm -rf /tmp/scripts
    RUN [ ! -d /tmp/artifacts ] || rm -rf /tmp/artifacts
    # Define the user
    USER 1001
## /
## END target image

