blob: a9f339e070ea58cfce6c2cc24e247e9567b598dd [file] [log] [blame]
FROM openjdk:9
ARG USER
ARG USERID
WORKDIR /
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
# workaround for the keysever to be flaky
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131 0E98404D386FA1D9 54404762BBB6E853 \
|| apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131 0E98404D386FA1D9 54404762BBB6E853 \
|| apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131 0E98404D386FA1D9 54404762BBB6E853 \
&& echo 'deb http://deb.debian.org/debian buster main contrib non-free\n\
deb-src http://deb.debian.org/debian buster main contrib non-free\n\
deb http://deb.debian.org/debian buster-updates main contrib non-free\n\
deb-src http://deb.debian.org/debian buster-updates main contrib non-free\n\
deb http://deb.debian.org/debian buster-backports main contrib non-free\n\
deb-src http://deb.debian.org/debian buster-backports main contrib non-free\n\
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free\n\
deb-src http://security.debian.org/debian-security/ buster/updates main contrib non-free' \
> /etc/apt/sources.list
RUN apt-get update && apt-get install -yq -o APT::Immediate-Configure=0 \
aapt \
vim \
python-jinja2 \
python3 \
google-cloud-sdk
RUN mkdir -p autotest moblab depot_tools
RUN echo adduser --gecos "" --disabled-password --uid ${USERID} ${USER}
RUN adduser --gecos "" --disabled-password --uid ${USERID} ${USER}
RUN chown -R ${USER}:${USER} autotest moblab depot_tools
USER $USER
RUN git clone https://chromium.googlesource.com/chromiumos/third_party/autotest
RUN git clone https://chromium.googlesource.com/chromiumos/platform/moblab
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH=/depot_tools:/moblab/scripts:${PATH}