Travis: Cache Docker builds from previous image

pull/27/head
Gerber, Mike 5 years ago
parent d8463e2ea7
commit 9f29e53e63

@ -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

@ -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 .

Loading…
Cancel
Save