Dockerfile моего докера 17.03.1-ce выглядит следующим образом
FROM ubuntu:16.04
# Specifying versions is better??
RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip \
git \
gradle \
vim \
wget \
openjdk-8-jdk
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;
В настоящее время в нем есть jdk 8. Но когда я создаю контейнер и пытаюсь запустить на нем пробную гонку "esally", он запрашивает у меня установку jdk10.
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
[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)
-------------------------------
Кто-нибудь может сообщить мне, почему это происходит. Если нет работы, чтобы запустить это с помощью jdk 8. Может ли кто-нибудь сообщить мне пошаговую процедуру установки jdk 10 в моем докере.
.rally / тесты / команды / по умолчанию / автомобили / v1 / vanilla
отредактируйте файл config.ini для правильной версии java