Sign inSign up

nas2docker/gcc_openjdk8u151

By nas2docker

Updated almost 9 years ago

FROM buildpack-deps:stretch-scm || with openjdk8u151 + supervisord + gcc + python3

Image
0

221

nas2docker/gcc_openjdk8u151 repository overview

FROM buildpack-deps:stretch-scm

#Install supervisord RUN apt-get update && apt-get install -y openssh-server apache2 supervisor ffmpeg python3 python3-pip RUN mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor

RUN apt-get update && apt-get install -y --no-install-recommends
bzip2
g++
gcc
unzip
xz-utils
&& rm -rf /var/lib/apt/lists/*

#Install python3 pip3 packages RUN pip3 install flask ffmpy requests

#Default to UTF-8 file.encoding ENV LANG C.UTF-8

#add a simple script that can auto-detect the appropriate JAVA_HOME value

#based on whether the JDK or only the JRE is installed RUN {
echo '#!/bin/sh';
echo 'set -e';
echo;
echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"';
} > /usr/local/bin/docker-java-home
&& chmod +x /usr/local/bin/docker-java-home

#do some fancy footwork to create a JAVA_HOME that's cross-architecture-safe RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-home ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 8u151 ENV JAVA_DEBIAN_VERSION 8u151-b12-1~deb9u1

#see https://bugs.debian.org/775775

#and https://github.com/docker-library/java/issues/19#issuecomment-70546872 ENV CA_CERTIFICATES_JAVA_VERSION 20170531+nmu1

RUN set -ex;
\

#deal with slim variants not having man page directories (which causes "update-alternatives" to fail) if [ ! -d /usr/share/man/man1 ]; then
mkdir -p /usr/share/man/man1;
fi;

apt-get update;
apt-get install -y
openjdk-8-jdk="$JAVA_DEBIAN_VERSION"
ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION"
;
rm -rf /var/lib/apt/lists/*;
\

#verify that "docker-java-home" returns what we expect [ "$(readlink -f "$JAVA_HOME")" = "$(docker-java-home)" ];
\

#update-alternatives so that future installs of other OpenJDK versions don't change /usr/bin/java update-alternatives --get-selections | awk -v home="$(readlink -f "$JAVA_HOME")" 'index($3, home) == 1 { $2 = "manual"; print | "update-alternatives --set-selections" }'; \

#... and verify that it actually worked for one of the alternatives we care about update-alternatives --query java | grep -q 'Status: manual'

#see CA_CERTIFICATES_JAVA_VERSION notes above RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure

Tag summary

Content type

Image

Digest

Size

462.2 MB

Last updated

almost 9 years ago

docker pull nas2docker/gcc_openjdk8u151