• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Creates an image that can check out / build / test the perfetto source. The
16# image is used by the Kokoro continuous integration jobs, but is also suitable
17# for local development.
18
19FROM debian:latest
20
21RUN set -ex; \
22    export DEBIAN_FRONTEND=noninteractive; \
23    echo deb http://deb.debian.org/debian testing main > \
24             /etc/apt/sources.list.d/testing.list; \
25    apt-get update; \
26    apt-get -y install python git curl sudo lz4 tar ccache tini libpulse0 \
27                       libgl1 libxml2 libc6-dev-i386 libtinfo5 gnupg2 \
28                       pkg-config zip g++ zlib1g-dev unzip python3; \
29    apt-get -y -t testing install gcc-7 g++-7 clang; \
30    curl https://bootstrap.pypa.io/get-pip.py | python -; \
31    pip install --quiet protobuf; \
32    curl -LO https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-installer-linux-x86_64.sh; \
33    chmod +x bazel-*-installer-linux-x86_64.sh; \
34    ./bazel-*-installer-linux-x86_64.sh; \
35    rm bazel-*-installer-linux-x86_64.sh; \
36    bazel version; \
37    useradd -d /ci/ramdisk perfetto; \
38    apt-get -y autoremove; \
39    rm -rf /var/lib/apt/lists/* /usr/share/man/* /usr/share/doc/*;
40
41COPY testrunner.sh /ci/testrunner.sh
42COPY init.sh /ci/init.sh
43
44VOLUME [ "/ci/cache", "/ci/ramdisk", "/ci/artifacts" ]
45ENTRYPOINT [ "tini", "-g", "--" ]
46CMD [ "bash", "/ci/init.sh" ]
47
48