sdocker/Dockerfile_qcom

65 lines
2.7 KiB
Plaintext
Raw Normal View History

2021-09-28 16:47:44 +02:00
#
# Minimum Docker image to build Android AOSP
#
2021-09-30 15:25:42 +02:00
FROM ubuntu:16.04
2021-09-28 16:47:44 +02:00
ARG USER_ID=1001
ARG GROUP_ID=1001
# Keep the dependency list as short as reasonable
2021-12-22 11:58:12 +01:00
# Need vim-common for stuff like xxd need by BS
2021-09-28 16:47:44 +02:00
RUN apt-get update && \
apt-get install -y bc bison bsdmainutils build-essential curl \
flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev \
lib32z1-dev libncurses5-dev \
libsdl1.2-dev libxml2-utils lzop \
openjdk-8-jdk \
genisoimage sudo \
gettext \
python-mako \
rsync \
2021-10-01 11:55:53 +02:00
libssl-dev \
2021-10-07 14:40:11 +02:00
cpio \
2021-12-22 11:58:12 +01:00
vim-common \
2021-09-30 15:25:42 +02:00
pngcrush schedtool xsltproc zip zlib1g-dev libswitch-perl git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev libc6-dev-i386 libncurses5-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig tofrodos python-markdown uuid-dev samba system-config-samba xmlstarlet libxml-simple-perl && \
2021-09-28 16:47:44 +02:00
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#ADD https://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/bin/
ADD https://source.codeaurora.org/quic/la/tools/repo/plain/repo?h=caf-stable /usr/local/bin/
RUN chmod 755 /usr/local/bin/*
# All builds will be done by user aosp
RUN groupadd -g ${GROUP_ID} aosp && useradd --create-home aosp -u ${USER_ID} -g ${GROUP_ID} -s /bin/bash && echo "aosp:aosp" | chpasswd && adduser aosp sudo
2022-03-12 23:14:00 +01:00
RUN adduser aosp dialout && adduser aosp plugdev
2021-09-28 16:47:44 +02:00
#ADD gitconfig /home/aosp/.gitconfig
RUN sudo -u aosp -H git config --global user.name "AOSP Docker"
RUN sudo -u aosp -H git config --global user.email "aosp@docker.local"
RUN sudo -u aosp -H git config --global color.ui auto
RUN sudo -u aosp -H git config --global http.'https://chipmaster2.qti.qualcomm.com'.followRedirects "true"
ADD ssh_config /home/aosp/.ssh/config
RUN chown aosp:aosp /home/aosp/.gitconfig
# No Dash
RUN sudo rm /bin/sh && sudo ln -s /bin/bash /bin/sh
2021-12-22 11:58:12 +01:00
# Using an old python version -> need specific pip
curl -fsSL -o- https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3.5
2021-09-28 16:47:44 +02:00
#Init gpg key for repo
RUN sudo -u aosp -H mkdir -p ~aosp/.repoconfig/gnupg
RUN sudo -u aosp -H GNUPGHOME=~/.repoconfig/gnupg gpg --keyserver keyserver.ubuntu.com --recv-key 67B7E448692B382C
# The persistent data will be in these two directories, everything else is
# considered to be ephemeral
VOLUME ["/tmp/ccache", "/aosp"]
# Improve rebuild performance by enabling compiler cache
2022-03-12 23:14:00 +01:00
# Not supported by AOSP anymore
2021-09-28 16:47:44 +02:00
ENV USE_CCACHE 1
ENV CCACHE_DIR /tmp/ccache
# Work in the build directory, repo is expected to be init'd here
USER aosp
WORKDIR /aosp
#Relogin to set env var such as USER
CMD sudo -E -iu aosp