# Copyright 2017 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/rhpam70-controller:7.0.1 image.

FROM jboss-eap-7/eap71:7.1.2

# Environment variables
ENV JBOSS_IMAGE_NAME="rhpam-7/rhpam70-controller" \
    JBOSS_IMAGE_VERSION="7.0.1" \
    JBOSS_PRODUCT="rhpam-controller" \
    RHPAM_CONTROLLER_VERSION="7.0.1" \
    PRODUCT_VERSION="7.0.1" \
    ADD_ONS_DISTRIBUTION_ZIP="rhpam-7.0.1.GA-add-ons.zip" \
    CONTROLLER_DISTRIBUTION_ZIP="rhpam-7.0-controller-ee7.zip" 

# Labels
LABEL name="$JBOSS_IMAGE_NAME" \
      version="$JBOSS_IMAGE_VERSION" \
      architecture="x86_64"  \
      com.redhat.component="rhpam-7-rhpam70-controller-container" \
      org.jboss.product="rhpam-controller" \
      org.jboss.product.version="7.0.1" \
      org.jboss.product.rhpam-controller.version="7.0.1" \
      org.concrt.version="1.4.1" \
      description="Red Hat Process Automation Manager Standalone Controller 7.0 container image" \
      summary="Red Hat Process Automation Manager Standalone Controller 7.0 container image"


USER root

# Add all artifacts to the /tmp/artifacts
# directory
COPY \
    rhpam-7.0.1.GA-add-ons.zip \
    /tmp/artifacts/

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

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

USER root
RUN rm -rf /tmp/scripts
USER root
RUN rm -rf /tmp/artifacts

USER 185



CMD ["/opt/eap/bin/standalone.sh", "-b", "0.0.0.0", "-c", "standalone-full.xml"]
