From b011563ca484caba41c5f98daa7fdfdcac54ff86 Mon Sep 17 00:00:00 2001 From: Jamil Date: Sat, 28 Jun 2025 11:53:39 -0700 Subject: [PATCH] fix(ci): fix missing daemon.json to use GCR (#9704) The docker registry is woefully unreliable due to rate limits and such. We have an action to use the GCP mirror, but it never took effect because of a minor bug - daemon.json is not present. Related: https://github.com/firezone/firezone/actions/runs/15945772933/job/44979632073?pr=9703 --- .github/actions/gcp-docker-login/action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/gcp-docker-login/action.yml b/.github/actions/gcp-docker-login/action.yml index 51ac32fe9..85a3370cd 100644 --- a/.github/actions/gcp-docker-login/action.yml +++ b/.github/actions/gcp-docker-login/action.yml @@ -34,8 +34,14 @@ runs: - name: Setup registry mirror shell: bash run: | + # Create daemon.json if it doesn't exist + if [ ! -f /etc/docker/daemon.json ]; then + echo '{}' | sudo tee /etc/docker/daemon.json > /dev/null + fi + + # Add or update registry-mirrors configuration echo "$(jq '. += { "registry-mirrors": ["https://mirror.gcr.io"] }' /etc/docker/daemon.json)" > new_daemon.json - sudo mv -f new_daemon.json /etc/docker/daemon.json + sudo mv new_daemon.json /etc/docker/daemon.json sudo service docker restart - name: Print docker system info