Created
July 17, 2023 09:08
-
-
Save KunYi/4f38b50af89618dc9337885cabf6606d to your computer and use it in GitHub Desktop.
Dockerfile for build Android 6/Intel platform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
ARG userid | |
ARG groupid | |
ARG username | |
RUN apt-get update && apt-get install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev \ | |
gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev \ | |
lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip python openjdk-7-jdk \ | |
&& apt-get install -y python mingw32 tofrodos \ | |
&& apt-get install -y squashfs-tools efitools bc ccache tesseract-ocr \ | |
imagemagick gettext python-libxml2 unzip dosfstools mtools dos2unix \ | |
&& apt-get install -y vim wget \ | |
&& apt-get install -y firefox \ | |
&& apt-get install -y libelf-dev libssl-dev | |
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ | |
apt-get update && \ | |
apt-get -y install git-lfs && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
RUN curl -o jdk8.tgz https://android.googlesource.com/platform/prebuilts/jdk/jdk8/+archive/master.tar.gz \ | |
&& tar -zxf jdk8.tgz linux-x86 \ | |
&& mv linux-x86 /usr/lib/jvm/java-8-openjdk-amd64 \ | |
&& rm -rf jdk8.tgz | |
RUN curl -o /usr/local/bin/repo https://storage.googleapis.com/git-repo-downloads/repo \ | |
&& chmod a+x /usr/local/bin/repo | |
RUN groupadd -g $groupid $username \ | |
&& useradd -m -u $userid -g $groupid $username \ | |
&& echo $username >/root/username \ | |
&& echo "export USER="$username >>/home/$username/.gitconfig | |
COPY gitconfig /home/$username/.gitconfig | |
RUN chown $userid:$groupid /home/$username/.gitconfig | |
VOLUME [ "/droid", "/tmp/ccache" ] | |
ENV HOME=/home/$username | |
ENV USER=$username | |
ENV USE_CCACHE=1 | |
ENV CCACHE_DIR=/tmp/ccache | |
WORKDIR $HOME | |
ENTRYPOINT chroot --userspec=$(cat /root/username):$(cat /root/username) / /bin/bash -i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment