Skip to content
Permalink
Browse files

fix ccache for Docker images

  • Loading branch information
3nids committed Nov 18, 2018
1 parent 06751f6 commit 73942f5775bd3fd13f2df97154cd96f55d8d26e5
Showing with 6 additions and 8 deletions.
  1. +3 −2 .ci/travis/linux/script.sh
  2. +1 −1 .docker/docker-compose.travis.yml
  3. +1 −4 .docker/qgis.dockerfile
  4. +1 −1 .travis.yml
@@ -19,12 +19,13 @@ set -e
mkdir -p "$CCACHE_DIR"

if [[ ${DOCKER_BUILD_QGIS_IMAGE} =~ true ]]; then
# copy ccache dir within QGIS source so it can be accessed from docker
cp -r ${CCACHE_DIR} ${TRAVIS_BUILD_DIR}/.ccache
# building docker images
DIR=$(git rev-parse --show-toplevel)/.docker
pushd "${DIR}"
echo "${bold}Building QGIS Docker image '${DOCKER_TAG}'...${endbold}"
docker build --build-arg CACHE_DIR=/root/.ccache \
--build-arg DOCKER_TAG="${DOCKER_TAG}" \
docker build --build-arg DOCKER_TAG="${DOCKER_TAG}" \
--cache-from "qgis/qgis:${DOCKER_TAG}" \
-t "qgis/qgis:${DOCKER_TAG}" \
-f qgis.dockerfile ..
@@ -16,7 +16,7 @@ services:
image: qgis/qgis3-build-deps:${DOCKER_TAG}
volumes:
- ${TRAVIS_BUILD_DIR}:/root/QGIS
- $HOME/.ccache:/root/.ccache # if changed, also change env var
- ${CCACHE_DIR}:/root/.ccache # if changed, also change env var
links:
- postgres
- mssql
@@ -3,23 +3,20 @@
# see https://docs.docker.com/docker-cloud/builds/advanced/
# using ARG in FROM requires min v17.05.0-ce
ARG DOCKER_TAG=latest
ARG CACHE_DIR

FROM qgis/qgis3-build-deps:${DOCKER_TAG}
MAINTAINER Denis Rouzaud <denis@opengis.ch>

LABEL Description="Docker container with QGIS" Vendor="QGIS.org" Version="1.1"


ENV CC=/usr/lib/ccache/clang
ENV CXX=/usr/lib/ccache/clang++
ENV QT_SELECT=5
ENV LANG=C.UTF-8

COPY . /usr/src/QGIS

COPY ${CACHE_DIR} /root/.ccache
ENV CCACHE_DIR=/root/.ccache
ENV CCACHE_DIR=/usr/src/QGIS/.ccache
RUN ccache -M 1G
RUN ccache -s

@@ -7,7 +7,7 @@ cache:
apt: true
pip: true
directories:
- $HOME/.ccache
- ${HOME}/.ccache
timeout: 1000

env:

0 comments on commit 73942f5

Please sign in to comment.
You can’t perform that action at this time.