Skip to content

Commit

Permalink
Merge pull request #7976 from planetscale/fail-docker-lite-build-when…
Browse files Browse the repository at this point in the history
…-deps-cant-install

docker/lite/install_dependencies.sh:  If the dependency install loop reaches its max number of retries, consider that a failure; exit the script nonzero so the build halts.
  • Loading branch information
deepthi authored Apr 28, 2021
2 parents 748725b + f774794 commit 00a649f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker/lite/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ esac
# Install flavor-specific packages
apt-get update
for i in $(seq 1 $MAX_RETRY); do apt-get install -y --no-install-recommends "${PACKAGES[@]}" && break; done
if [[ "$i" = "$MAX_RETRY" ]]; then
exit 1
fi

# Clean up files we won't need in the final image.
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit 00a649f

Please sign in to comment.