🐛 Bug Report — Runtime APIs: No privileged mode option for Containers local development
Issue
Following this documentation regarding using FUSE as FS with R2 in Cloudflare Containers, i encountered the following bug:
- https://github.com/cloudflare/containers/issues/112#issuecomment-3590004554
I figured out, there is no option for the end user to enable/ask workerd to run Docker in privileged mode for local testing which hinders local testing of containers for certain applications. (Eg: FUSE support/modprobe)
Proposed Solution
-
Expose
runPrevilegedoption and append it: https://github.com/cloudflare/workerd/blob/4d3bfd7df2bca147b2e98538f874f89c0ec13c02/src/workerd/server/container-client.c%2B%2B#L287 if enabled, the docker api capnp already has the specs https://github.com/cloudflare/workerd/blob/4d3bfd7df2bca147b2e98538f874f89c0ec13c02/src/workerd/server/docker-api.capnp#L145 -
Generate Capnp and allow Miniflare to access this for local-development
-
Miniflare exposes this as a config to wrangler
-
User can set a wrangler config either via config file or via CLI params
wrangler dev --previleged
Would like to know your thoughts on this, and would love to contribute regarding the same!
cc: @anonrig