2017-01-08 17:37:37 +01:00
|
|
|
FROM finalduty/archlinux
|
2017-05-03 17:32:18 +02:00
|
|
|
MAINTAINER Nicola Corna <nicola@corna.info>
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Environment variables
|
|
|
|
#######################
|
|
|
|
|
|
|
|
ENV SRC_DIR /srv/src
|
|
|
|
ENV CCACHE_DIR /srv/ccache
|
2017-01-21 23:59:02 +01:00
|
|
|
ENV ZIP_DIR /srv/zips
|
2017-01-21 13:53:58 +01:00
|
|
|
ENV LMANIFEST_DIR /srv/local_manifests
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Configurable environment variables
|
|
|
|
####################################
|
|
|
|
|
|
|
|
# By default we want to use CCACHE, you can disable this
|
|
|
|
# WARNING: disabling this may slow down a lot your builds!
|
|
|
|
ENV USE_CCACHE 1
|
|
|
|
|
|
|
|
# Environment for the LineageOS Branch name
|
2017-01-08 22:18:21 +01:00
|
|
|
# See https://github.com/LineageOS/android_vendor_cm/branches for possible options
|
2017-01-08 17:37:37 +01:00
|
|
|
ENV BRANCH_NAME 'cm-14.1'
|
|
|
|
|
|
|
|
# Environment for the device list ( separate by comma if more than one)
|
|
|
|
# eg. DEVICE_LIST=hammerhead,bullhead,angler
|
|
|
|
ENV DEVICE_LIST ''
|
|
|
|
|
|
|
|
# OTA URL that will be used inside CMUpdater
|
|
|
|
# Use this in combination with LineageOTA to make sure your device can auto-update itself from this buildbot
|
|
|
|
ENV OTA_URL ''
|
|
|
|
|
|
|
|
# User identity
|
|
|
|
ENV USER_NAME 'LineageOS Buildbot'
|
|
|
|
ENV USER_MAIL 'lineageos-buildbot@docker.host'
|
|
|
|
|
|
|
|
# If you want to start always fresh ( re-download all the source code everytime ) set this to 'true'
|
|
|
|
ENV CLEAN_SRCDIR false
|
|
|
|
|
|
|
|
# If you want to preserve old ZIPs set this to 'false'
|
|
|
|
ENV CLEAN_OUTDIR true
|
|
|
|
|
|
|
|
# Change this cron rule to what fits best for you
|
|
|
|
# By Default = At 10:00 UTC ~ 2am PST/PDT
|
|
|
|
ENV CRONTAB_TIME '0 10 * * *'
|
|
|
|
|
2017-01-17 19:35:03 +01:00
|
|
|
# Print detailed output rather than only summary
|
|
|
|
ENV DEBUG false
|
|
|
|
|
|
|
|
# Clean artifacts output after each build
|
|
|
|
ENV CLEAN_AFTER_BUILD true
|
|
|
|
|
2017-01-21 11:43:44 +01:00
|
|
|
# Provide root capabilities builtin inside the ROM ( see http://lineageos.org/Update-and-Build-Prep/ )
|
|
|
|
ENV WITH_SU true
|
|
|
|
|
2017-01-21 11:49:25 +01:00
|
|
|
# Provide a default JACK configuration in order to avoid out-of-memory issues
|
|
|
|
ENV ANDROID_JACK_VM_ARGS "-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
|
|
|
|
|
2017-05-03 17:32:18 +02:00
|
|
|
# Custom packages to be installed
|
|
|
|
ENV CUSTOM_PACKAGES ''
|
|
|
|
|
|
|
|
# Custom static Java libraries to be installed
|
|
|
|
ENV CUSTOM_STATIC_JAVA_LIBRARY ''
|
|
|
|
|
|
|
|
# Key path (from the root of the android source)
|
|
|
|
ENV RELEASEKEY_PATH ''
|
|
|
|
|
2017-01-08 17:37:37 +01:00
|
|
|
# Create Volume entry points
|
|
|
|
############################
|
|
|
|
|
|
|
|
VOLUME $SRC_DIR
|
|
|
|
VOLUME $CCACHE_DIR
|
2017-01-21 23:59:02 +01:00
|
|
|
VOLUME $ZIP_DIR
|
2017-01-21 11:56:58 +01:00
|
|
|
VOLUME $LMANIFEST_DIR
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Copy required files and fix permissions
|
|
|
|
#####################
|
|
|
|
|
|
|
|
COPY src/* /root/
|
|
|
|
|
|
|
|
# Create missing directories
|
|
|
|
############################
|
|
|
|
|
|
|
|
RUN mkdir -p $SRC_DIR
|
|
|
|
RUN mkdir -p $CCACHE_DIR
|
2017-01-21 23:59:02 +01:00
|
|
|
RUN mkdir -p $ZIP_DIR
|
2017-01-21 11:56:58 +01:00
|
|
|
RUN mkdir -p $LMANIFEST_DIR
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Set the work directory
|
|
|
|
########################
|
|
|
|
|
|
|
|
WORKDIR $SRC_DIR
|
|
|
|
|
|
|
|
# Fix permissions
|
|
|
|
#################
|
|
|
|
|
2017-01-08 17:42:01 +01:00
|
|
|
RUN chmod 0755 /root/*
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Enable multilib support
|
|
|
|
#########################
|
|
|
|
|
|
|
|
RUN sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf
|
|
|
|
|
2017-01-08 18:16:26 +01:00
|
|
|
# Install development tools
|
|
|
|
##############################
|
|
|
|
|
|
|
|
RUN pacman -Sy --needed --noconfirm --noprogressbar base-devel
|
|
|
|
|
2017-01-08 17:37:37 +01:00
|
|
|
# Replace conflicting packages
|
|
|
|
##############################
|
|
|
|
|
2017-01-08 18:16:26 +01:00
|
|
|
RUN yes | pacman -Sy --noprogressbar --needed gcc-multilib
|
2017-01-08 17:37:37 +01:00
|
|
|
|
2017-02-23 22:58:41 +01:00
|
|
|
# Install manually compiled packages
|
|
|
|
####################################
|
2017-01-08 17:37:37 +01:00
|
|
|
|
2017-02-23 22:58:41 +01:00
|
|
|
RUN pacman -U --noconfirm --noprogressbar /root/ncurses5-compat-libs-6.0+20161224-1-x86_64.pkg.tar.xz \
|
|
|
|
&& rm /root/ncurses5-compat-libs-6.0+20161224-1-x86_64.pkg.tar.xz \
|
|
|
|
&& pacman -U --noconfirm --noprogressbar /root/lib32-ncurses5-compat-libs-6.0-4-x86_64.pkg.tar.xz \
|
|
|
|
&& rm /root/lib32-ncurses5-compat-libs-6.0-4-x86_64.pkg.tar.xz
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Install required Android AOSP packages
|
|
|
|
########################################
|
|
|
|
|
2017-01-08 18:16:26 +01:00
|
|
|
RUN pacman -Sy --needed --noconfirm --noprogressbar \
|
2017-01-08 17:37:37 +01:00
|
|
|
git \
|
|
|
|
gnupg \
|
|
|
|
flex \
|
|
|
|
bison \
|
|
|
|
gperf \
|
|
|
|
sdl \
|
|
|
|
wxgtk \
|
|
|
|
squashfs-tools \
|
|
|
|
curl \
|
|
|
|
ncurses \
|
|
|
|
zlib \
|
|
|
|
schedtool \
|
|
|
|
perl-switch \
|
|
|
|
zip \
|
|
|
|
unzip \
|
|
|
|
libxslt \
|
|
|
|
bc \
|
|
|
|
lib32-zlib \
|
|
|
|
lib32-ncurses \
|
|
|
|
lib32-readline \
|
|
|
|
rsync \
|
|
|
|
maven \
|
|
|
|
repo \
|
|
|
|
imagemagick \
|
|
|
|
ccache \
|
|
|
|
libxml2 \
|
|
|
|
cronie \
|
2017-01-08 19:35:25 +01:00
|
|
|
ninja \
|
2017-02-23 22:38:56 +01:00
|
|
|
wget \
|
|
|
|
jdk8-openjdk
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Create missing symlink to python2
|
|
|
|
###################################
|
|
|
|
RUN ln -s /usr/bin/python2 /usr/local/bin/python
|
|
|
|
|
2017-01-15 23:03:17 +01:00
|
|
|
# Allow redirection of stdout to docker logs
|
|
|
|
############################################
|
|
|
|
RUN ln -sf /proc/1/fd/1 /var/log/docker.log
|
|
|
|
|
2017-01-08 17:37:37 +01:00
|
|
|
# Cleanup
|
|
|
|
#########
|
|
|
|
|
2017-02-23 22:58:41 +01:00
|
|
|
RUN yes | pacman -Scc
|
2017-01-08 17:37:37 +01:00
|
|
|
|
|
|
|
# Set the entry point to init.sh
|
|
|
|
###########################################
|
|
|
|
|
2017-05-03 17:32:18 +02:00
|
|
|
ENTRYPOINT /root/init.sh
|