Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quote escaping in command to configure Docker DNS #116

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion lib/setup-cloudflare-warp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading