Skip to content

Commit

Permalink
use sudo tee to write daemon.json (#1389)
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 6319a51 commit 7dd406a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
# Configure DockerHub mirror
tmp=$(mktemp)
if [ ! -f /etc/docker/daemon.json ]; then
echo '{}' > /etc/docker/daemon.json
echo '{}' | sudo tee /etc/docker/daemon.json
fi
jq '."registry-mirrors" = ["https://mirror.gcr.io"]' /etc/docker/daemon.json > "$tmp"
sudo mv "$tmp" /etc/docker/daemon.json
Expand Down

0 comments on commit 7dd406a

Please sign in to comment.