The Dockerfile of my docker 17.03.1-ce is as follows

FROM ubuntu:16.04

# Specifying versions is better??
RUN apt-get update && \
    apt-get install -y \
                python3 \
                python3-pip \
                git \
                gradle \
                vim \
                wget \

RUN pip3 install esrally

RUN apt-get clean && \
        rm -rf /var/lib/apt/lists/*

RUN useradd  -ms /bin/bash esrally

USER esrally

WORKDIR /home/esrally

RUN echo "export http_proxy=${http_proxy}" > /home/esrally/.bashrc
RUN git config --global http.proxy ${http_proxy}

RUN esrally configure --assume-defaults
RUN esrally list tracks
RUN mkdir ~/.rally/benchmarks/tracks/default/tsgraph

COPY track-tsgraph/*.json /home/esrally/.rally/benchmarks/tracks/default/tsgraph/

RUN mkdir /home/esrally/esrally-docker
COPY . /home/esrally/esrally-docker/

RUN mkdir -p /home/esrally/downloads; \
    cd /home/esrally/downloads; \
    wget wget -e use_proxy=yes -e HTTP_PROXY=${http_proxy} http://www-eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz; \
    cd /home/esrally; tar -zxvf /home/esrally/downloads/apache-maven-3.3.9-bin.tar.gz;

It currently has jdk 8 in it. But when I create a container and try to run a trial race "esrally" on it, it asks me for jdk10 installation.

    ____        ____
   / __ \____ _/ / /_  __
  / /_/ / __ `/ / / / / /
 / _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /

[WARNING] No Internet connection detected. Automatic download of track data sets etc. is disabled.
[INFO] Preparing for race ...
[ERROR] Cannot race. ('JAVA_HOME points to JDK 8 but it should point to JDK 10.', None)
    Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/mechanic/mechanic.py", line 540, in receiveMsg_StartNodes
    msg.distribution, msg.external, msg.docker)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/mechanic/mechanic.py", line 631, in create
    s = supplier.create(cfg, sources, distribution, build, challenge_root_path, car, plugins)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/mechanic/supplier.py", line 27, in create
    java_home = _java_home(car)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/mechanic/supplier.py", line 81, in _java_home
    _, path = jvm.resolve_path(int(build_jdk))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/utils/jvm.py", line 94, in resolve_path
    return majors, _resolve_single_path(majors, sysprop_reader=sysprop_reader)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/utils/jvm.py", line 134, in _resolve_single_path
    java_home = do_resolve(generic_env_var, major)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/esrally/utils/jvm.py", line 121, in do_resolve
    raise exceptions.SystemSetupError("{} points to JDK {} but it should point to JDK {}.".format(env_var, actual_major, major))
esrally.exceptions.SystemSetupError: ('JAVA_HOME points to JDK 8 but it should point to JDK 10.', None)

Getting further help:
* Check the log files in /Users/ndoke/.rally/logs for errors.
* Read the documentation at https://esrally.readthedocs.io/en/1.0.0/
* Ask a question on the forum at https://discuss.elastic.co/c/elasticsearch/rally
* Raise an issue at https://github.com/elastic/rally/issues and include the log files in /Users/ndoke/.rally/logs.

[INFO] FAILURE (took 2 seconds)

Can some let me know why this is happening. If there is no work around to get this running with jdk 8. Can someone let me know a step by step procedure of installing jdk 10 in my docker.



edit config.ini file for the correct java version

  • 1
    This needs a lot more explanation. – Sven Aug 17 '18 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.