1
0
mirror of https://github.com/stucki/docker-lineageos synced 2024-12-19 17:12:29 -05:00

Move ccache initialization to startup.sh

This fixes a major problem with ccache being initialized before the volume is mounted.
The contents of /srv/ccache were therefore empty and CCACHE_MAXSIZE=50G was not set.
The result was that ccache could only use up to 1 GB of cache data (default value).
This commit is contained in:
Michael Stucki 2015-03-16 10:23:40 +01:00
parent 80450d6cc1
commit 33f7fd052e
2 changed files with 5 additions and 2 deletions

View File

@ -49,8 +49,6 @@ WORKDIR /home/cmbuild/android
VOLUME /home/cmbuild/android
VOLUME /srv/ccache
RUN CCACHE_DIR=/srv/ccache ccache -M 50G
CMD /root/startup.sh
# This does not work yet, see https://github.com/docker/docker/issues/9806

View File

@ -1,5 +1,10 @@
#!/bin/sh
# Initialize ccache if needed
if [ ! -f /srv/ccache/CACHEDIR.TAG ]; then
CCACHE_DIR=/srv/ccache ccache -M 50G
fi
# Fix console permissions as long as https://github.com/docker/docker/issues/9806 is not fixed
usermod --groups tty --append cmbuild
chgrp tty /dev/console