fix(build): use cached docker images to avoid rebuilding layers
This commit is contained in:
parent
505cacfbc2
commit
3f1bc0e1b0
|
@ -13,7 +13,10 @@ docker pull "${IMAGE_FULL}" || echo "Failed to load last image."
|
||||||
|
|
||||||
echo "Building image: ${IMAGE_FULL}"
|
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" ]];
|
if [[ "${IMAGE_PUSH}" == "--push" ]];
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue