blob: 8a410fed4f1c240a7f1fceb7d664333f71cfe838 [file]
# Copyright 2025 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
FROM python:3.8-slim-buster AS build
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' -e 's|security.debian.org/debian-security|archive.debian.org/debian-security|g' -e '/buster-updates/d' /etc/apt/sources.list \
&& apt-get update && \
apt-get install -y \
wget
RUN pip install --upgrade pip
# Install python packages
COPY cpcon_requirements_py3.txt /
RUN pip3 install --require-hashes -r cpcon_requirements_py3.txt
COPY cpcon-publish /usr/bin/
RUN mkdir /usr/local/autotest
WORKDIR /usr/local/autotest
# Download autotest
RUN wget https://chromium.googlesource.com/chromiumos/third_party/autotest/+archive/refs/heads/main.tar.gz
RUN tar -xvzf main.tar.gz
RUN rm main.tar.gz
# Download tko_pb2.py
RUN wget https://chromium.googlesource.com/chromiumos/config/+archive/refs/heads/main/python/chromiumos/test/artifact.tar.gz
RUN tar -xvzf artifact.tar.gz -C tko tko_pb2.py
RUN rm artifact.tar.gz
# Remove Extras
RUN rm -rf client/deps/
RUN rm -rf client/site_tests/
RUN rm -rf moblab/
RUN rm -rf server/site_tests/
RUN rm -rf test_suites/
RUN rm -rf frontend/client/src/autotest/
# Set directory back to root
WORKDIR /