# 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-smartrouter-openshift:1.1 image.

FROM rhpam-7/rhpam70-smartrouter:latest

# Environment variables
ENV JBOSS_IMAGE_NAME="rhpam-7/rhpam70-smartrouter-openshift" \
    JBOSS_IMAGE_VERSION="1.1" \
    LAUNCH_DIR="/opt/rhpam-smartrouter/launch" 

# Labels
LABEL name="$JBOSS_IMAGE_NAME" \
      version="$JBOSS_IMAGE_VERSION" \
      architecture="x86_64"  \
      com.redhat.component="rhpam-7-rhpam70-smartrouter-openshift-container" \
      io.k8s.description="Platform for running Red Hat Process Automation Manager Smart Router" \
      io.k8s.display-name="Red Hat Process Automation Manager Smart Router 7.0" \
      io.openshift.expose-services="9000:http" \
      io.openshift.tags="javaee,rhpam,rhpam7" \
      org.concrt.version="1.4.1" \
      description="Red Hat Process Automation Manager Smart Router 7.0 container image" \
      summary="Red Hat Process Automation Manager Smart Router 7.0 container image"

# Exposed ports
EXPOSE 9000

USER root

# Add all artifacts to the /tmp/artifacts
# directory
COPY \
    slf4j-simple-1.7.22.redhat-1.jar \
    /tmp/artifacts/

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

# Custom scripts
USER root
RUN [ "bash", "-x", "/tmp/scripts/os-logging/configure.sh" ]

USER root
RUN [ "bash", "-x", "/tmp/scripts/os.bpmsuite.smartrouter/configure.sh" ]

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

USER 185



CMD ["/opt/rhpam-smartrouter/openshift-launch.sh"]
