blob: d090de4fc5b095f7f978b6c82fdfab9917acbc14 [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} && \
25 sed -i 's/archive/tw.archive/' /etc/apt/sources.list && \
26 export DEBIAN_FRONTEND=noninteractive && \
27 apt-get update -qq && apt-get install -y \
28 git-core \
29 gnupg \
30 flex \
31 bison \
32 gperf \
33 build-essential \
34 zip \
35 unzip \
36 curl \
37 zlib1g-dev \
38 gcc-multilib \
39 g++-multilib \
40 libc6-dev-i386 \
41 lib32ncurses5-dev \
42 x11proto-core-dev \
43 libx11-dev \
44 lib32z-dev \
45 libgl1-mesa-dev \
46 libxml2-utils \
47 tzdata \
48 python-dev \
49 python3-dev \
50 xsltproc
51
52# Configuring tzdata noninteractively
53RUN ln -fs /usr/share/zoneinfo/Asia/Taipei /etc/localtime && \
54 dpkg-reconfigure -f noninteractive tzdata
55ENV LANG=C.UTF-8
56
57# Run smoke_tests by default unless overriding the startup command.
58USER ${USER}
59WORKDIR ${SRCTOP}
60CMD ["prebuilts/asuite/aidegen/smoke_tests"]