diff --git a/.travis.yml b/.travis.yml index 77076f1..c0dad57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,10 +12,17 @@ jobs: - stage: Build Docker image script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + # We are using the image my_ocrd_workflow to cache, so pull and tag it + - docker pull $DOCKER_USERNAME/my_ocrd_workflow + - docker tag $DOCKER_USERNAME/my_ocrd_workflow my_ocrd_workflow + - FORCE_DOWNLOAD=y ./build - - docker images + - docker tag my_ocrd_workflow $DOCKER_USERNAME/my_ocrd_workflow + - docker images - docker push $DOCKER_USERNAME/my_ocrd_workflow + - stage: Test script: - docker pull $DOCKER_USERNAME/my_ocrd_workflow diff --git a/build b/build index 5bb124f..08f7c9d 100755 --- a/build +++ b/build @@ -19,4 +19,4 @@ get_from_web() { handle_data -docker build -t my_ocrd_workflow . +docker build --cache-from my_ocrd_workflow -t my_ocrd_workflow .