Skip to content

Commit

Permalink
create daemon.json if it doesn't exist (#1386)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Callaway <[email protected]>
  • Loading branch information
bobcallaway authored Dec 16, 2024
1 parent db8a872 commit 3b87709
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b87709

Please sign in to comment.