xref: /aosp_15_r20/prebuilts/asuite/Dockerfile (revision b3adc34a6be591bf5fd4943dfdce52f3982696f0)
1# Copyright 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
15FROM ubuntu:latest
16ARG UID
17ARG USER
18ARG SRCTOP
19ENV IS_CONTAINER=true
20ENV USER=${USER}
21
22# Installing AOSP essential packages and creating the local user.
23# The UID inside and outside must be the same.
24RUN useradd -mu ${UID} ${USER} && \
25    export DEBIAN_FRONTEND=noninteractive && \
26    apt-get update -qq && apt-get install -y \
27        git-core \
28        gnupg \
29        flex \
30        bison \
31        gperf \
32        build-essential \
33        zip \
34        unzip \
35        curl \
36        zlib1g-dev \
37        gcc-multilib \
38        g++-multilib \
39        libc6-dev-i386 \
40        lib32ncurses5-dev \
41        x11proto-core-dev \
42        libx11-dev \
43        lib32z-dev \
44        libgl1-mesa-dev \
45        libxml2-utils \
46        tzdata \
47        python-dev \
48        python3-dev \
49        xsltproc \
50        sudo
51
52# Configuring tzdata noninteractively
53RUN dpkg-reconfigure -f noninteractive tzdata && \
54    echo "${USER} ALL=(ALL:ALL)NOPASSWD: ALL" > /etc/sudoers.d/${USER} && \
55	mkdir ${SRCTOP} && chown -R ${USER} ${SRCTOP}
56RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /bin/repo && chmod +x /bin/repo
57ENV LANG=C.UTF-8
58
59USER ${USER}
60WORKDIR ${SRCTOP}
61