blob: a67b01dc936315acd14971fcf79b07275b2c770b [file] [log] [blame]
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# TODO change to dynamically use FROM the build versioned container
FROM autotest_base7 as build
RUN apt-get update \
&& apt-get install -y \
ca-certificates
WORKDIR /
# Java - required for CTS/GTS
RUN wget https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz
RUN tar xvf openjdk-9.0.4_linux-x64_bin.tar.gz
RUN update-alternatives --install /usr/bin/java java \
/jdk-9.0.4/bin/java 200000
RUN update-alternatives --config java
# Java 9 has a issue where the ca certificates are not correct,
# get them from v 13
RUN wget https://download.java.net/java/GA/jdk13.0.1/cec27d702aa74d5a8630c65ae61e4305/9/GPL/openjdk-13.0.1_linux-x64_bin.tar.gz
RUN tar xvf openjdk-13.0.1_linux-x64_bin.tar.gz
RUN cp jdk-13.0.1/lib/security/cacerts jdk-9.0.4/lib/security/
RUN rm -rf jdk-13.0.1
RUN rm -f openjdk*.gz
# Set chromeos-test permissions
RUN mkdir -p /tmp/autotest-tradefed-cache
RUN chown chromeos-test:chromeos-test /tmp/autotest-tradefed-cache