netty5/docker/Dockerfile.centos
Chris Vest a179db8066
Raise the Netty 5 minimum required Java version to Java 11. (#10650)
Raise the Netty 5 minimum required Java version to Java 11.

Motivation:
Java 11 has been out for some time, and Netty 5 is still some ways out.
There are also many good features in Java 11 that we wish to use, such as VarHandles, var-keyword, and the module system.
There is no reason for Netty 5 to not require Java 11, since Netty 4.x will still be supported for the time being.

Modification:
Remove everything in the pom files related to Java versions older than Java 11.
Remove the animal-sniffer plug-in and rely on the `--release` compiler flag instead.
Remove docker files related to Java versions older than Java 11.
Remove the copied SCTP APIs -- we should test this commit independently on Windows.
Remove the OpenJdkSelfSignedCertGenerator.java file and just always use Bouncy Castle for generating self-signed certificates for testing.
Make netty-testsuite tests pass by including Bouncy Castle as a test dependency, so we're able to generate our self-signed certificate.

Result:
Java 11 is now the minimum required Java version.
2020-10-12 14:13:01 +02:00

31 lines
778 B
Docker

ARG centos_version=6
FROM centos:$centos_version
# needed to do again after FROM due to docker limitation
ARG centos_version
# install dependencies
RUN yum install -y \
apr-devel \
autoconf \
automake \
git \
glibc-devel \
libtool \
lksctp-tools \
lsb-core \
make \
openssl-devel \
tar \
wget
ARG java_version=11
ENV JAVA_VERSION $java_version
# installing java with jabba
RUN curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | JABBA_COMMAND="install $JAVA_VERSION -o /jdk" bash
RUN echo 'export JAVA_HOME="/jdk"' >> ~/.bashrc
RUN echo 'PATH=/jdk/bin:$PATH' >> ~/.bashrc
# when the JDK is GraalVM install native-image
RUN if [ -O /jdk/bin/gu ]; then /jdk/bin/gu install native-image; else echo "Not GraalVM, skip installation of native-image" ; fi