1
0
Fork 0

fix(build): use cached docker images to avoid rebuilding layers

This commit is contained in:
Sean Sube 2023-01-21 17:18:46 -06:00
parent 505cacfbc2
commit 3f1bc0e1b0
1 changed files with 4 additions and 1 deletions

View File

@ -13,7 +13,10 @@ docker pull "${IMAGE_FULL}" || echo "Failed to load last image."
echo "Building image: ${IMAGE_FULL}"
docker build -f "${IMAGE_FILE}" -t "${IMAGE_FULL}" . || { echo "Failed to build image!"; exit 1; }
docker build \
--cache-from "${IMAGE_FULL}" \
-f "${IMAGE_FILE}" \
-t "${IMAGE_FULL}" . || { echo "Failed to build image!"; exit 1; }
if [[ "${IMAGE_PUSH}" == "--push" ]];
then