diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index d7b9605..b7e4b82 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -36,4 +36,5 @@ jobs: organization: ${{ secrets.CLOUDFLARE_ACCESS_ORGANIZATION }} auth_client_id: ${{ secrets.CLOUDFLARE_ACCESS_CLIENT_ID }} auth_client_secret: ${{ secrets.CLOUDFLARE_ACCESS_CLIENT_SECRET }} + configure_docker_dns: true - run: curl -I https://www.google.com diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c80fe7..b581d71 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,4 +24,5 @@ jobs: organization: ${{ secrets.CLOUDFLARE_ACCESS_ORGANIZATION }} auth_client_id: ${{ secrets.CLOUDFLARE_ACCESS_CLIENT_ID }} auth_client_secret: ${{ secrets.CLOUDFLARE_ACCESS_CLIENT_SECRET }} + configure_docker_dns: true - run: curl -I https://www.google.com diff --git a/README.md b/README.md index 4e46f8b..d9ed5f8 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ with: - `organization` - (required) The name of your Cloudflare Zero Trust organization. - `auth_client_id` - (required) The service token client id. - `auth_client_secret` - (required) The service token client secret. -- `configure_docker_dns` - (optional) Configure Docker to use Cloudflare WARP for DNS resolution. Defaults to `false`. +- `configure_docker_dns` - (optional) *Linux Only* Configure Docker to use Cloudflare WARP for DNS resolution. Defaults to `false`. ## Cloudflare Permissions > [!TIP] diff --git a/lib/setup-cloudflare-warp.js b/lib/setup-cloudflare-warp.js index a413aab..caf1abf 100644 --- a/lib/setup-cloudflare-warp.js +++ b/lib/setup-cloudflare-warp.js @@ -124,7 +124,7 @@ async function configureLinuxDockerDNS() { `/bin/bash -c "echo "DNSStubListenerExtra=172.17.0.1" | sudo tee -a /etc/systemd/resolved.conf"`, ); await exec.exec( - `/bin/bash -c "cat /etc/docker/daemon.json | jq '.dns=["172.17.0.1"]' | sudo tee /etc/docker/daemon.json"`, + `/bin/bash -c "cat /etc/docker/daemon.json | jq '.dns=[\\"172.17.0.1\\"]' | sudo tee /etc/docker/daemon.json"`, ); await exec.exec("sudo systemctl restart systemd-resolved"); await exec.exec("sudo systemctl restart docker");