blob: 838f911be205deb9336f07501b1721f9a5f9813e [file] [log] [blame]
Jim Tang4b54e1b2019-10-15 17:03:28 +08001# 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} && \
Jim Tang4b54e1b2019-10-15 17:03:28 +080025 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 \
Jim Tangdb963c32020-08-10 23:16:22 +080049 xsltproc \
50 sudo
Jim Tang4b54e1b2019-10-15 17:03:28 +080051
52# Configuring tzdata noninteractively
Jim Tang30627f52022-01-25 10:35:49 +080053RUN 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
Jim Tang4b54e1b2019-10-15 17:03:28 +080057ENV LANG=C.UTF-8
58
Jim Tang4b54e1b2019-10-15 17:03:28 +080059USER ${USER}
60WORKDIR ${SRCTOP}