• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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# The image that builds the Perfetto UI and deploys to GCS.
16# See go/perfetto-ui-autopush for docs on how this works end-to-end.
17
18FROM debian:buster-slim
19
20ENV PATH=/builder/google-cloud-sdk/bin/:$PATH
21RUN set -ex; \
22    export DEBIAN_FRONTEND=noninteractive; \
23    apt-get update; \
24    apt-get -y install python3 python3-distutils python3-pip git curl tar tini \
25            pkg-config zip libc-dev libgcc-8-dev; \
26    update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1; \
27    pip3 install --quiet protobuf crcmod; \
28    mkdir -p /builder && \
29    curl -s -o - https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz | tar -zx -C /builder; \
30    /builder/google-cloud-sdk/install.sh \
31        --usage-reporting=false \
32        --bash-completion=false \
33        --disable-installation-options \
34        --override-components gcloud gsutil; \
35    git config --system credential.helper gcloud.sh; \
36    useradd -d /home/perfetto perfetto; \
37    apt-get -y autoremove; \
38    rm -rf /var/lib/apt/lists/* /usr/share/man/* /usr/share/doc/*;
39
40ENTRYPOINT [ "tini", "-g", "--" ]
41