Skip to content

Commit

Permalink
Merge pull request #111 from depot/enable-forwarding
Browse files Browse the repository at this point in the history
Enable IP forwarding when enabling CNI
  • Loading branch information
jacobwgillespie authored May 21, 2024
2 parents ac04106 + 658406c commit a9e943e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tasks/buildkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ keepBytes = ${cacheSizeBytes}
}
await fsp.mkdir('/etc/buildkit', {recursive: true})
await fsp.writeFile('/etc/buildkit/cni.json', JSON.stringify(cniConfig, null, 2), {mode: 0o644})
try {
await execa('sysctl', ['-w', 'net.ipv4.ip_forward=1'], {stdio: 'inherit', reject: false})
} catch {}
}

const controller = new AbortController()
Expand Down

0 comments on commit a9e943e

Please sign in to comment.