Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (41 sloc) 2.02 KB
# LICENSE UPL 1.0
#
# Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
#
FROM oraclelinux:7-slim
# Note: If you are behind a web proxy, set the build variables for the build:
# E.g.: docker build --build-arg "https_proxy=..." --build-arg "http_proxy=..." --build-arg "no_proxy=..." ...
ARG GRAAL_VERSION=1.0.0-rc11
ENV LANG=en_US.UTF-8
ENV GRAALVM_PKG=https://github.com/oracle/graal/releases/download/vm-$GRAAL_VERSION/graalvm-ce-$GRAAL_VERSION-linux-amd64.tar.gz \
JAVA_HOME=/opt/graalvm-ce-$GRAAL_VERSION/ \
PATH=$PATH:/opt/rh/llvm-toolset-7/root/usr/bin \
LD_LIBRARY_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64 \
MANPATH=/opt/rh/llvm-toolset-7/root/usr/share/man \
PKG_CONFIG_PATH=/opt/rh/llvm-toolset-7/root/usr/lib64/pkgconfig \
PYTHONPATH=/opt/rh/llvm-toolset-7/root/usr/lib/python2.7/site-packages \
X_SCLS=llvm-toolset-7
RUN curl -o /etc/yum.repos.d/public-yum-ol7.repo http://yum.oracle.com/public-yum-ol7.repo \
&& yum-config-manager --enable ol7_developer \
&& yum-config-manager --enable ol7_developer_EPEL \
&& yum-config-manager --enable ol7_optional_latest \
&& yum-config-manager --enable ol7_software_collections \
&& yum install -y bzip2-devel ed gcc gcc-c++ gcc-gfortran gzip file fontconfig less libcurl-devel make openssl-devel readline-devel tar vi which xz-devel zlib-devel \
&& yum install -y glibc-static libcxx libcxx-devel llvm-toolset-7 zlib-static \
&& rm -rf /var/cache/yum
RUN fc-cache -f -v
ADD gu-wrapper.sh /usr/local/bin/gu
RUN set -eux \
&& curl --fail --silent --location --retry 3 ${GRAALVM_PKG} \
| gunzip | tar x -C /opt/ \
# Set alternative links
&& mkdir -p "/usr/java" \
&& ln -sfT "$JAVA_HOME" /usr/java/default \
&& ln -sfT "$JAVA_HOME" /usr/java/latest \
&& for bin in "$JAVA_HOME/bin/"*; do \
base="$(basename "$bin")"; \
[ ! -e "/usr/bin/$base" ]; \
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
done \
&& chmod +x /usr/local/bin/gu
CMD java -version