Jim Tang | 4b54e1b | 2019-10-15 17:03:28 +0800 | [diff] [blame] | 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 | |
| 15 | FROM ubuntu:latest |
| 16 | ARG UID |
| 17 | ARG USER |
| 18 | ARG SRCTOP |
| 19 | ENV IS_CONTAINER=true |
| 20 | ENV USER=${USER} |
| 21 | |
| 22 | # Installing AOSP essential packages and creating the local user. |
| 23 | # The UID inside and outside must be the same. |
| 24 | RUN 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 |
| 53 | RUN ln -fs /usr/share/zoneinfo/Asia/Taipei /etc/localtime && \ |
| 54 | dpkg-reconfigure -f noninteractive tzdata |
| 55 | ENV LANG=C.UTF-8 |
| 56 | |
| 57 | # Run smoke_tests by default unless overriding the startup command. |
| 58 | USER ${USER} |
| 59 | WORKDIR ${SRCTOP} |
| 60 | CMD ["prebuilts/asuite/aidegen/smoke_tests"] |