Installation in Docker Containers


This article describes how to install OverOps in Docker containers.


Installing OverOps with Docker

Adding TFC to Dockerfiles

Debian/Ubuntu using apt-get

CentOS/RedHat using yum

Alpine Linux

Testing the Installation


OverOps Installation with Docker

OverOps can be installed inside Docker containers as a dedicated Takipi for Containers (TFC) version, tailored to run inside a Docker.

To install OverOps in a Docker container:

  1. Create an OverOps user to retrieve an installation secret key.
  2. Add the following snippet to your Dockerfile in order to install OverOps for container:
    Debian/Ubuntu using apt-get:
    RUN wget -O - -o /dev/null | bash /dev/stdin -i --sk=<secret key>
    CentOS/RedHat using yum:
    RUN curl -Ls /dev/null | bash /dev/stdin -i --sk=<secret key>
  3. Add the Takipi agent library -agentlib:TakipiAgent to your JVM arguments:
    CMD java -agentlib:TakipiAgent -jar yourjar.jar


Adding TFC to Dockerfiles

To include OverOps in your Docker applications, add the takipi-t4c-installer snippet according to the relevant Dockerfile. The lines specific to installing OverOps are displayed in bold.

Debian/Ubuntu using apt-get

A sample Dockerfile, is displayed below. It can also be accessed on GitHub:

FROM ubuntu:16.04
MAINTAINER Chen Harel ""
RUN apt-get update
RUN apt-get install -y wget openjdk-8-jdk
RUN update-ca-certificates -f
RUN wget -O - -o /dev/null | bash /dev/stdin -i --sk=<YOUR SECRET KEY>
RUN /opt/takipi/etc/takipi-setup-machine-name <YOUR CONTAINER NAME>
RUN wget -O scala-boom.jar
CMD java -agentlib:TakipiAgent -jar scala-boom.jar

CentOS/RedHat using yum

A sample Dockerfile, is displayed below. It can also be accessed on GitHub:

FROM centos:7
MAINTAINER Chen Harel ""
RUN yum install -y java-1.8.0-openjdk.x86_64
RUN curl -Ls /dev/null | bash /dev/stdin -i --sk=<YOUR SECRET KEY>
RUN curl -o scala-boom.jar -L
CMD java -agentlib:TakipiAgent -jar scala-boom.jar

Alpine Linux

A sample Dockerfile, is displayed below. It can also be accessed on GitHub:

# Takipi
FROM openjdk:8-jre-alpine

MAINTAINER Chen Harel ""
# Java Version and other ENV
    JAVA_PACKAGE=jdk \
    JAVA_JCE=standard \
    JAVA_HOME=/opt/jdk \
    PATH=${PATH}:/opt/jdk/bin \
    GLIBC_VERSION=2.23-r3 \
RUN set -ex && \
    apk upgrade --update && \
    apk add --update libstdc++ curl ca-certificates bash && \
    for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION} glibc-i18n-${GLIBC_VERSION}; do curl -sSL${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \
    apk add --allow-untrusted /tmp/*.apk && \
    rm -v /tmp/*.apk && \
    ( /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true ) && \
    echo "export LANG=C.UTF-8" > /etc/profile.d/ && \
    /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \
    mkdir /tmp/dcevm && \
    curl -L -o /tmp/dcevm/DCEVM-light-8u112-installer.jar "" && \
    mkdir /opt && \
    curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie" -o /tmp/java.tar.gz \${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/d54c1d3a095b4ff2b6607d096fa80163/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz && \
    gunzip /tmp/java.tar.gz && \
    tar -C /opt -xf /tmp/java.tar && \
    ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jdk && \
    cd /tmp/dcevm && \
    unzip DCEVM-light-8u112-installer.jar && \
    mkdir -p /opt/jdk/jre/lib/amd64/dcevm && \
    cp linux_amd64_compiler2/product/ /opt/jdk/jre/lib/amd64/dcevm/ && \
    if [ "${JAVA_JCE}" == "unlimited" ]; then echo "Installing Unlimited JCE policy" && \
      curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie" -o /tmp/jce_policy-${JAVA_VERSION_MAJOR}.zip \${JAVA_VERSION_MAJOR}/jce_policy-${JAVA_VERSION_MAJOR}.zip && \
      cd /tmp && unzip /tmp/jce_policy-${JAVA_VERSION_MAJOR}.zip && \
      cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /opt/jdk/jre/lib/security/; \
    fi && \
    sed -i s/#networkaddress.cache.ttl=-1/networkaddress.cache.ttl=10/ $JAVA_HOME/jre/lib/security/ && \
    apk del curl glibc-i18n && \
    rm -rf /opt/jdk/* \
           /opt/jdk/lib/missioncontrol \
           /opt/jdk/lib/visualvm \
           /opt/jdk/lib/*javafx* \
           /opt/jdk/jre/plugin \
           /opt/jdk/jre/bin/javaws \
           /opt/jdk/jre/bin/jjs \
           /opt/jdk/jre/bin/orbd \
           /opt/jdk/jre/bin/pack200 \
           /opt/jdk/jre/bin/policytool \
           /opt/jdk/jre/bin/rmid \
           /opt/jdk/jre/bin/rmiregistry \
           /opt/jdk/jre/bin/servertool \
           /opt/jdk/jre/bin/tnameserv \
           /opt/jdk/jre/bin/unpack200 \
           /opt/jdk/jre/lib/javaws.jar \
           /opt/jdk/jre/lib/deploy* \
           /opt/jdk/jre/lib/desktop \
           /opt/jdk/jre/lib/*javafx* \
           /opt/jdk/jre/lib/*jfx* \
           /opt/jdk/jre/lib/amd64/ \
           /opt/jdk/jre/lib/amd64/libprism_*.so \
           /opt/jdk/jre/lib/amd64/ \
           /opt/jdk/jre/lib/amd64/ \
           /opt/jdk/jre/lib/amd64/ \
           /opt/jdk/jre/lib/amd64/libjavafx*.so \
           /opt/jdk/jre/lib/amd64/libjfx*.so \
           /opt/jdk/jre/lib/ext/jfxrt.jar \
           /opt/jdk/jre/lib/ext/nashorn.jar \
           /opt/jdk/jre/lib/oblique-fonts \
           /opt/jdk/jre/lib/plugin.jar \
           /tmp/* /var/cache/apk/* && \
    echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf

# Set environment
ENV JAVA_HOME /opt/jdk
ENV PATH /opt/jdk/bin:${PATH}

### Takipi Installation 


# Takipi installer dependencies (we need xz for a future untar process)
RUN apk --update add xz curl ca-certificates
RUN update-ca-certificates
RUN curl -Ls > /tmp/gcc-libs.tar.gz && \
	mkdir /usr/libgcc-compat && tar -xvf /tmp/gcc-libs.tar.gz -C /usr/libgcc-compat && rm -rf /tmp/gcc-libs.tar.gz
RUN curl -Ls > /tmp/zlib.tar.gz && \
	mkdir /usr/zlib-compat && tar -xvf /tmp/zlib.tar.gz -C /usr/zlib-compat && rm -rf /tmp/zlib.tar.gz

# Install Takipi
RUN apk update && apk add ca-certificates && update-ca-certificates && apk add openssl
RUN curl -Ls /dev/null | \
  bash /dev/stdin -i --sk=${TAKIPI_SECRET_KEY} --no-check-certificates

RUN rm /usr/glibc-compat/etc/
RUN echo /usr/zlib-compat/usr/lib >> /usr/glibc-compat/etc/
RUN echo /usr/libgcc-compat/usr/lib >> /usr/glibc-compat/etc/
RUN echo /opt/takipi/lib >> /usr/glibc-compat/etc/
RUN echo /usr/lib >> /usr/glibc-compat/etc/
RUN echo /lib >> /usr/glibc-compat/etc/
RUN /usr/glibc-compat/sbin/ldconfig
### Takipi installation complete

# Getting Java tester
RUN wget -O scala-boom.jar

# More cleanups
RUN apk del xz icu wget curl tar \
  && rm -rf /tmp/* \
  && rm -rf /var/cache/apk/* \ 
  && rm -rf glibc-2.23-r3.apk glibc-bin-2.23-r3.apk

ENV PATH ${PATH}:/opt/takipi/lib

# Running a java process with Takipi
CMD java -agentlib:TakipiAgent -jar scala-boom.jar


Testing the Installation

Having installed OverOps in the Docker, verify that it is up and running on your system:

To test the OverOps installation:

  1. From the OverOps web application dashboard, click Add Server. From the dialog box, click Next and then click Test Installation.

    When the connection is established, the JVM status is 'Monitoring'.

  2. Test that your application throws exceptions.


Easier Takipi installation using one-liners · chook/docker-takipi@5a16c4e

0 out of 0 found this helpful



Please sign in to leave a comment.