mirror of
https://github.com/stucki/docker-lineageos
synced 2024-12-19 17:12:29 -05:00
Use ccache (really)
This commit is contained in:
parent
26e6bc2072
commit
985e697544
@ -11,7 +11,7 @@ RUN apt-get -qq update
|
||||
RUN apt-get install -y bsdmainutils curl file screen
|
||||
RUN apt-get install -y android-tools-adb android-tools-fastboot
|
||||
RUN apt-get install -y bison build-essential flex git gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-7-jdk openjdk-7-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
|
||||
RUN apt-get install -y g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
|
||||
RUN apt-get install -y ccache g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
|
||||
RUN apt-get install -y tig
|
||||
|
||||
# Workaround for apt-get upgrade issue described here: https://github.com/dotcloud/docker/issues/1724
|
||||
@ -35,4 +35,8 @@ ADD android-env-vars.sh /etc/android-env-vars.sh
|
||||
RUN echo "source /etc/android-env-vars.sh" >> /etc/bash.bashrc
|
||||
|
||||
WORKDIR /home/cmbuild/android
|
||||
|
||||
VOLUME /home/cmbuild/android
|
||||
VOLUME /srv/ccache
|
||||
|
||||
RUN CCACHE_DIR=/srv/ccache ccache -M 50G
|
||||
|
@ -1,2 +1,3 @@
|
||||
export PATH=/home/cmbuild/bin:$PATH
|
||||
export USE_CCACHE=1
|
||||
export CCACHE_DIR=/srv/ccache
|
||||
|
7
run.sh
7
run.sh
@ -3,13 +3,14 @@
|
||||
cd $(dirname $0)
|
||||
|
||||
SOURCE=$(pwd)/android
|
||||
CCACHE=$(pwd)/ccache
|
||||
CONTAINER_HOME=/home/cmbuild
|
||||
CONTAINER=cyanogenmod
|
||||
REPOSITORY=stucki/cyanogenmod
|
||||
|
||||
# Create a shared folder which will be used as working directory if it
|
||||
# does not already exist.
|
||||
# Create shared folders
|
||||
mkdir -p $SOURCE
|
||||
mkdir -p $CCACHE
|
||||
|
||||
# Build image if needed
|
||||
IMAGE_EXISTS=$(docker images -q $REPOSITORY)
|
||||
@ -28,7 +29,7 @@ if [[ $IS_RUNNING == "true" ]]; then
|
||||
elif [[ $IS_RUNNING == "false" ]]; then
|
||||
docker start -i $CONTAINER
|
||||
else
|
||||
docker run -v $SOURCE:$CONTAINER_HOME/android -i -t --name $CONTAINER $REPOSITORY sh -c "screen -s /bin/bash"
|
||||
docker run -v $SOURCE:$CONTAINER_HOME/android -v $CCACHE:/srv/ccache -i -t --name $CONTAINER $REPOSITORY sh -c "screen -s /bin/bash"
|
||||
fi
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue
Block a user