From 0d940841c71964e1cadc9cd95808f9dd349d08aa Mon Sep 17 00:00:00 2001 From: Dan Kirkwood Date: Tue, 16 Oct 2018 13:09:34 -0600 Subject: [PATCH 1/2] replace jdk with openjdk --- .../cdn-in-a-box/traffic_router/Dockerfile | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile index ca158be06d..b37418cbce 100644 --- a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile +++ b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile @@ -22,34 +22,22 @@ FROM centos:7 MAINTAINER Dan Kirkwood -# Default values for TMCAT RPM and RPM -- override with `docker build --build-arg JDK=...' -ARG JDK8_RPM=http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.rpm +# Default values for TOMCAT RPM and RPM -- override with `docker build --build-arg JDK=...' ARG TRAFFIC_ROUTER_RPM=traffic_router/traffic_router.rpm ARG TOMCAT_RPM=traffic_router/tomcat.rpm -### Common for all sub-component builds -RUN yum -y install epel-release git rpm-build net-tools iproute nc wget tar unzip \ +RUN yum -y install epel-release git rpm-build net-tools iproute nc wget tar unzip \ perl-JSON perl-WWWCurl which make autoconf automake gcc gcc-c++ apr apr-devel \ - openssl openssl-devel bind-utils net-tools perl-JSON-PP gettext && \ - yum -y clean all + openssl openssl-devel bind-utils net-tools perl-JSON-PP gettext \ + java-1.8.0-openjdk-devel-debug.x86_64 \ + java-1.8.0-openjdk && \ + yum -y clean all && \ + ln -s /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.*.el7_5.x86_64-debug /opt/java ADD $TRAFFIC_ROUTER_RPM /traffic_router.rpm ADD $TOMCAT_RPM /tomcat.rpm -## Install and link java_home to /opt/java -RUN curl -kvsL -o /jdk8.rpm -H 'Cookie: oraclelicense=accept-securebackup-cookie;' "$JDK8_RPM" && \ - rpm -ivh /jdk8.rpm && \ - ln -sfv $(find /usr/java -mindepth 1 -maxdepth 1 -type d -name jdk\*) /opt/java - -# Install Tomcat and Tomcat Native -RUN cd / && rpm2cpio /traffic_router.rpm | cpio -ivd && \ - rpm2cpio /tomcat.rpm | cpio -ivd && \ - tar -C /opt -xvpf /opt/tomcat/bin/tomcat-native.tar.gz - -# Compile and install Tomcat-native -RUN cd $(find /opt -maxdepth 1 -type d | grep tomcat-native )/native && \ - ./configure --prefix=/opt/tomcat --with-apr=`which apr-1-config` --with-java-home=/opt/java --with-ssl && \ - make install +RUN yum install /traffic_router.rpm /tomcat.rpm ADD enroller/server_template.json \ traffic_router/run.sh \ From 2b034e7fffb6651262c40bc106ab11fb881a0a14 Mon Sep 17 00:00:00 2001 From: Dan Kirkwood Date: Wed, 7 Nov 2018 12:27:34 -0700 Subject: [PATCH 2/2] added missing -y on install --- infrastructure/cdn-in-a-box/traffic_router/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile index b37418cbce..af379b3d6d 100644 --- a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile +++ b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile @@ -37,7 +37,7 @@ RUN yum -y install epel-release git rpm-build net-tools iproute nc wget tar unzi ADD $TRAFFIC_ROUTER_RPM /traffic_router.rpm ADD $TOMCAT_RPM /tomcat.rpm -RUN yum install /traffic_router.rpm /tomcat.rpm +RUN yum -y install /traffic_router.rpm /tomcat.rpm ADD enroller/server_template.json \ traffic_router/run.sh \