Skip to content

Commit

Permalink
Create empty /etc/docker/daemon.json if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
F21 committed Jan 21, 2025
1 parent 7a766f5 commit 39f0b20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/setup-cloudflare-warp.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ async function writeWindowsConfiguration(

async function configureLinuxDockerDNS() {
// Set up resolved DNS stub listener on alternative IP as docker does not support DNS servers on 127.x.x.x
await fs.stat("/etc/docker/daemon.json", function (err) {
if (err.code === "ENOENT") {
exec.exec(`/bin/bash -c "echo '{}' | sudo tee /etc/docker/daemon.json"`);
}
});
await exec.exec(
`/bin/bash -c "echo "DNSStubListenerExtra=172.17.0.1" | sudo tee -a /etc/systemd/resolved.conf"`,
);
Expand Down

0 comments on commit 39f0b20

Please sign in to comment.