Wait for Docker daemon (#1586)

Sometimes the first command after starting the Docker daemon container
fails, presumably because the container did not start yet. Wait until
the Docker daemon is ready.
This commit is contained in:
Stefan Agner 2021-10-11 16:06:36 +02:00 committed by GitHub
parent f012f09d4f
commit e0e270df1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,14 @@ set -e
APPARMOR_URL="https://version.home-assistant.io/apparmor.txt" APPARMOR_URL="https://version.home-assistant.io/apparmor.txt"
# Install supervisor # Make sure we can talk to the Docker daemon
echo "Waiting for Docker daemon..."
while ! docker version 2> /dev/null > /dev/null; do
sleep 1
done
# Install Supervisor, plug-ins and landing page
echo "Loading containers..."
for image in /build/images/*.tar; do for image in /build/images/*.tar; do
docker load --input "${image}" docker load --input "${image}"
done done