Stop pulling unnecessary image during build

This commit is contained in:
Gabriel Augendre 2020-08-27 22:31:28 +02:00
parent 45fe91dc9b
commit c86e15596b
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4

View file

@ -16,9 +16,8 @@ tasks:
docker login -u crocmagnon --password-stdin < .docker-secret docker login -u crocmagnon --password-stdin < .docker-secret
cd blog cd blog
docker pull crocmagnon/blog:latest || true docker pull crocmagnon/blog:latest || true
docker pull crocmagnon/blog:tests || true
docker build --pull --cache-from crocmagnon/blog:latest -t crocmagnon/blog:latest -f Dockerfile . docker build --pull --cache-from crocmagnon/blog:latest -t crocmagnon/blog:latest -f Dockerfile .
docker build --cache-from crocmagnon/blog:tests -t crocmagnon/blog:tests -f tests.Dockerfile . docker build -t crocmagnon/blog:tests -f tests.Dockerfile .
docker run --rm -t crocmagnon/blog:tests /app/docker/runtests.sh docker run --rm -t crocmagnon/blog:tests /app/docker/runtests.sh
docker push crocmagnon/blog:latest docker push crocmagnon/blog:latest
docker push crocmagnon/blog:tests docker push crocmagnon/blog:tests