Only configure Docker if it is present on the system

This commit is contained in:
David Heinemeier Hansson
2025-08-31 08:50:32 +02:00
parent 29c2233399
commit 9f5975b717

View File

@@ -1,5 +1,6 @@
echo "Configure Docker to use the host's DNS resolver"
if cmd-present docker; then
# If the daemon configuration has been changed since we wrote it, leave it as-is
ORIGINAL_CONFIG='{"log-driver":"json-file","log-opts":{"max-size":"10m","max-file":"5"}}'
@@ -19,3 +20,4 @@ echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/res
sudo systemctl restart systemd-resolved
sudo systemctl restart docker
fi