From 08fc6c242e0fad735f60a83a2427c1ceeb5519ea Mon Sep 17 00:00:00 2001 From: Bob Callaway Date: Mon, 16 Dec 2024 08:56:35 -0500 Subject: [PATCH] create daemon.json if it doesn't exist Signed-off-by: Bob Callaway --- actions/setup/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/setup/action.yml b/actions/setup/action.yml index 12952e149..289224181 100644 --- a/actions/setup/action.yml +++ b/actions/setup/action.yml @@ -83,6 +83,9 @@ runs: if [ ${{ inputs.sigstore-only }} == "false" ]; then # Configure DockerHub mirror tmp=$(mktemp) + if [ ! -f /etc/docker/daemon.json ]; then + echo '{}' > /etc/docker/daemon.json + fi jq '."registry-mirrors" = ["https://mirror.gcr.io"]' /etc/docker/daemon.json > "$tmp" sudo mv "$tmp" /etc/docker/daemon.json sudo service docker restart