mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
fix: retry the local build's image check instead of rebuilding on a busy docker daemon
This commit is contained in:
1 parent
6ecd6fa1d0
commit
d6bc4da759
1 file changed
+8
-1
@@ -89,7 +89,14 @@ linuxfs_replaced=1
|
|||||||
rm -rf -- "${linuxfs_dir}"
|
rm -rf -- "${linuxfs_dir}"
|
||||||
mkdir -p "${linuxfs_dir}"
|
mkdir -p "${linuxfs_dir}"
|
||||||
|
|
||||||
if ! docker image inspect "${image_name}" >/dev/null 2>&1; then
|
# A busy daemon (another container running) can fail one inspect of an image that is there, and
|
||||||
|
# the rebuild that follows hangs on the registry's metadata for the base image: ask a few times.
|
||||||
|
image_present=0
|
||||||
|
for _ in 1 2 3 4 5; do
|
||||||
|
if docker image inspect "${image_name}" >/dev/null 2>&1; then image_present=1; break; fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
if [[ "${image_present}" = 0 ]]; then
|
||||||
docker build --platform linux/amd64 -t "${image_name}" \
|
docker build --platform linux/amd64 -t "${image_name}" \
|
||||||
-f "${repo_root}/tools/local-cross.Dockerfile" "${repo_root}"
|
-f "${repo_root}/tools/local-cross.Dockerfile" "${repo_root}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user