Commit 905ab19f authored by Ryan Berkheimer's avatar Ryan Berkheimer
Browse files

Updated Dockerfile *demo and *deploy contexts.

parent 55a87d72
Pipeline #5985 failed with stage
in 0 seconds
......@@ -7,9 +7,9 @@
FROM registry.access.redhat.com/ubi7/ubi:latest
#Install standard RHEL7 tools
#RUN yum -y install --disableplugin=subscription-manager \
# locate vim unzip wget git java-11-openjdk-devel gcc gcc-gfortran gcc-c++ make \
# && yum --disableplugin=subscription-manager clean all
RUN yum -y install --disableplugin=subscription-manager \
rh-python36 vim wget git java-11-openjdk-devel gcc gcc-gfortran gcc-c++ make \
&& yum --disableplugin=subscription-manager clean all
#Install Java Variables
RUN cd $(dirname $(readlink -f $(which java))) && cd .. \
......@@ -19,24 +19,30 @@ RUN cd $(dirname $(readlink -f $(which java))) && cd .. \
&& echo "export PATH=${JAVA_HOME}/bin:$PATH" >> /etc/profile.d/java.sh \
&& echo "export CLASSPATH=${JAVA_HOME}/bin:${CLASSPATH}" >> /etc/profile.d/java.sh
#Install Gradle and Variables
RUN wget https://services.gradle.org/distributions/gradle-5.4.1-bin.zip -P /tmp \
&& unzip -d /opt/gradle /tmp/gradle-*.zip \
&& export GRADLE_HOME=/opt/gradle/gradle-5.4.1 \
&& touch /etc/profile.d/gradle.sh \
&& echo "export GRADLE_HOME=${GRADLE_HOME}" > /etc/profile.d/gradle.sh \
&& echo "export PATH=${GRADLE_HOME}/bin:$PATH" >> /etc/profile.d/gradle.sh
#Retrieve operational user or use default (messageapi)
ARG user=messageapi
ARG workdir=/home/${user}
#Add default type user 'messageapi'
RUN useradd messageapi
#Create the operational user and change to their home dir
RUN useradd ${user}
WORKDIR ${workdir}
#Change to new 'messageapi' user
USER messageapi
#Retrieve the installation script to the user's home directory and set permissions for execution
RUN wget https://k3.cicsnc.org/rberkheimer/messageapi/-/raw/mac-develop/scripts/install/package/install_k3.sh?inline=false \
--no-check-certificate -O install_k3.sh
RUN chmod 755 install_k3.sh
#Change to specified user
USER ${user}
#Set PATH and other user variables in bashrc
RUN cd $(dirname $(readlink -f $(which java))) && cd .. \
&& export JAVA_HOME=$PWD \
&& echo "PATH=${JAVA_HOME}/bin:\$PATH" >> ~/.bashrc \
&& export GRADLE_HOME=/opt/gradle/gradle-5.4.1 \
&& echo "PATH=${GRADLE_HOME}/bin:\$PATH" >> ~/.bashrc \
&& source ~/.bashrc
\ No newline at end of file
&& source ~/.bashrc
#Install the Java core plus C/CPP API wrappers from install script
RUN echo "${PWD}"
RUN ./install_k3.sh "C_CPP"
RUN rm install_k3.sh
......@@ -2,6 +2,9 @@
#This dockerfile installs only prebuilt artifacts by replicating the instructions
#given to users within the core package readme.
#Note that MessageAPI installs for the specified user 'user'. The default value
#of this user is 'messageapi'.
#Base Image (RHEL7 UBI)
FROM registry.access.redhat.com/ubi7/ubi:latest
......@@ -11,15 +14,36 @@ RUN yum -y install --disableplugin=subscription-manager \
wget java-11-openjdk \
&& yum --disableplugin=subscription-manager clean all
#Add default type user 'messageapi' for production code as non root
RUN useradd messageapi
#Retrieve operational user or use default (messageapi)
ARG user=messageapi
ARG workdir=/home/${user}
#Change to new 'messageapi' user
USER messageapi
#Create the operational user and change to their home dir
RUN useradd ${user}
WORKDIR ${workdir}
#Install the Java core
#Retrieve the installation script to the user's home directory and set permissions for execution
RUN wget https://k3.cicsnc.org/rberkheimer/messageapi/-/raw/mac-develop/scripts/install/package/install_k3.sh?inline=false \
--no-check-certificate -O install_k3.sh \
&& chmod +x install_k3.sh \
&& ./install_k3.sh "C_CPP" \
&& rm install_k3.sh
\ No newline at end of file
--no-check-certificate -O install_k3.sh
RUN chmod 755 install_k3.sh
#Change to specified user
USER ${user}
#Install the Java core plus C/CPP API wrappers from install script
RUN echo "${PWD}"
RUN ./install_k3.sh "C_CPP"
RUN rm install_k3.sh
#Install user job configurations
#ARG config=.
#COPY ${config} config
#Install user shared libraries
#ARG so_dir=
#COPY ${so_dir} ${MESSAGEAPI_LIBS}
#Install user JARs
#ARG jars=
#COPY ${jars} ${CORE_INSTALL_DIR}
#TODO: add a run command to add each individual JAR to the CLASSPATH (pattern is required for use in SO)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment