-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
22 lines (16 loc) · 1.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM socrata/runit-bionic
MAINTAINER Socrata <[email protected]>
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" --force-yes -fuy install software-properties-common && \
DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:openjdk-r/ppa && apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install openjdk-8-jdk && update-java-alternatives -s java-1.8.0-openjdk-amd64 && apt-get -y install openjdk-11-jdk
# Regenerate certs to work around bug in ca-certificates-java that results in missing Java certs
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775775
RUN update-ca-certificates -f
ENV LD_LIBRARY_PATH /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server:${LD_LIBRARY_PATH}
ENV JAVA_TOOL_OPTIONS="-Dcom.sun.management.jmxremote.port=11114 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
COPY set_jmx_hostname /etc/my_init.d/set_jmx_hostname
COPY collectd-jmx.conf /etc/collectd/conf.d/jmx.conf
RUN sed -i -e '/^sleep/a\' -e 'export LD_PRELOAD=/usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so' /etc/runit/runsvdir/default/collectd/run
# LABEL must be last for proper base image discoverability
LABEL repository.socrata/runit-java8-bionic=""