From c5973d9875fab734df24480276b644fbb2bf6b97 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 5 May 2022 18:36:02 +0200 Subject: [PATCH] check the DNS resolving on startup Signed-off-by: szaimen --- Containers/mastercontainer/start.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index bb319010..f38321e0 100755 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -116,6 +116,16 @@ if [ -n "$APACHE_PORT" ]; then fi fi +# Check DNS resolution +# Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565 +curl https://nextcloud.com &>/dev/null +if [ "$?" = 6 ]; then + echo "Could not resolve the host nextcloud.com." + echo "Most likely the DNS resolving does not work." + echo "You should be able to fix this by adding the '--dns=\"ip.address.of.dns.server\"' option to the docker run command." + exit 1 +fi + # Add important folders mkdir -p /mnt/docker-aio-config/data/ mkdir -p /mnt/docker-aio-config/session/