Skip to content

Instantly share code, notes, and snippets.

@derlaft
Created July 3, 2021 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derlaft/e75de4ce1349098314f66832d3e112f9 to your computer and use it in GitHub Desktop.
Save derlaft/e75de4ce1349098314f66832d3e112f9 to your computer and use it in GitHub Desktop.
Docker image for building lingeageos-devel (for Android 7 and 8) in Docker
FROM archlinux:base-devel
# install sudo && git
RUN set -ex \
# enable multilib
&& echo "[multilib]" >> /etc/pacman.conf \
&& echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf \
&& pacman --noconfirm -Sy \
&& pacman --noconfirm -S git \
&& useradd -m user \
&& echo 'user ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/allow_user_sudo \
&& pacman --noconfirm -Scc
USER user
WORKDIR /home/user
# install yay
RUN set -ex \
&& git clone https://aur.archlinux.org/yay.git --depth 1 \
&& cd yay \
&& makepkg -si --noconfirm --rmdeps \
&& cd - \
&& rm -rf yay \
&& yay --noconfirm -Scc
# install lineageos-devel
RUN set -ex \
&& yay -Sy \
&& yay -S --noconfirm repo multilib-devel \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB \
&& yay -S --noconfirm lineageos-devel jdk8-openjdk jre8-openjdk-headless \
&& yay --noconfirm -Scc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment