Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions infrastructure/cdn-in-a-box/traffic_router/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -y install /traffic_router.rpm /tomcat.rpm

ADD enroller/server_template.json \
traffic_router/run.sh \
Expand Down