netty5/docker/Dockerfile.centos
Vojin Jovanovic 3eff1dbc1b Remove deprecated GraalVM native-image flags (#9118)
Motivation:

The first final version of GraalVM was released which deprecated some flags. We should use the new ones.

Modifications:

Removes the use of deprecated GraalVM native-image flags
Adds a flag to initialize netty at build time.

Result:

Do not use deprecated flags
2019-05-22 19:20:54 +02:00

31 lines
779 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=1.8
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