Public Repository

Last pushed: 2 years ago
Short Description
for ATS testing
Full Description

project P37317

Docker Pull Command
Owner
sculang

Comments (1)
sculang
2 years ago

This is a minimal demo image.

Dockerfile (without proxy settings)

FROM centos:7
MAINTAINER "S.Culang" stephane.culang@sanofi.com

#centos:7 is broken for services (httpd) because of fakesystemd replacing systemd. using centos:6 in the meantime

###########

Set HTTP proxy to allow direct access to downloads

###########

<censored>

###########

Set custom yum repo file because default ones have issue to be investigated

###########

RUN rm -f /etc/yum.repos.d/*
COPY centos7_yum_repos.conf /etc/yum.repos.d/centos.repo

###########

Install missing tools

###########
RUN yum install -y zip unzip svn sudo tar vim wget

###########

Add user and group jbadmin

###########

#RUN groupadd -g 7004 jbadmin && useradd -u 7004 -g 7004 -s /bin/bash -p '*' jbadmin && chage -I -1 -m 0 -M -1 -E -1 jbadmin

###########

Download and unarchive Java

###########

Java Version

ENV JAVA_VERSION_MAJOR=8 JAVA_VERSION_MINOR=66 JAVA_VERSION_BUILD=17 JAVA_PACKAGE=jdk

RUN curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie"\
http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
| tar -xzf - -C /opt &&\
ln -s /opt/jdk1.${JAVA_VERSIONMAJOR}.0${JAVA_VERSION_MINOR} /opt/jdk &&\
rm -rf /opt/jdk/src.zip \
/opt/jdk/lib/missioncontrol \
/opt/jdk/lib/visualvm \
/opt/jdk/lib/
javafx \
/opt/jdk/jre/lib/plugin.jar \
/opt/jdk/jre/lib/ext/jfxrt.jar \
/opt/jdk/jre/bin/javaws \
/opt/jdk/jre/lib/javaws.jar \
/opt/jdk/jre/lib/desktop \
/opt/jdk/jre/plugin \
/opt/jdk/jre/lib/deploy
\
/opt/jdk/jre/lib/javafx \
/opt/jdk/jre/lib/jfx \
/opt/jdk/jre/lib/amd64/libdecorasse.so \
/opt/jdk/jre/lib/amd64/libprism
.so \
/opt/jdk/jre/lib/amd64/libfxplugins.so \
/opt/jdk/jre/lib/amd64/libglass.so \
/opt/jdk/jre/lib/amd64/libgstreamer-lite.so \
/opt/jdk/jre/lib/amd64/libjavafx
.so \
/opt/jdk/jre/lib/amd64/libjfx*.so

###########

Set environment for JAVA

###########

for some reason we cannot put these ENV on same line

ENV JAVA_HOME=/opt/jdk1.${JAVA_VERSIONMAJOR}.0${JAVA_VERSION_MINOR}
ENV CLASSPATH=/opt/jdk1.${JAVA_VERSIONMAJOR}.0${JAVA_VERSION_MINOR}/lib
ENV PATH=${PATH}:${JAVA_HOME}/bin

###########

Download and install JON agent from JON LAB

###########
RUN curl -Ls http://xsnl10w900s.pharma.aventis.com:7080/agentupdate/download > /tmp/jon_agent.jar && \
cd /opt && \
java -jar /tmp/jon_agent.jar --install && \
rm /tmp/jon_agent.jar

###########

Install script to configure and start JON agent

Warning to start container and launch this script you must pass parameters like this:

docker run -dit --name "docker_centos7_mini_1" --net=host -e CONTAINER_NAME='docker_centos7_mini_1' -e JON_SERVER_FQDN='xsnl10w900s.pharma.aventis.com' -e PORTS_OFFSET='1' centos7_mini:latest /opt/startup_script_centos7_mini.sh

###########
COPY startup_script_centos7_mini.sh /opt/

###########

Give ownership of OPT to jbadmin so he has permissions on installed software there

###########
RUN chmod 700 /opt/startup_script_centos7_mini.sh

#&& chown -R jbadmin:jbadmin /opt