Inject files or data into a bubblewrap sandbox via file descriptors (--file, --bind-data, --ro-bind-data, --perms)

domain: github.com/containers/bubblewrap · 8 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Open the data as an fd in the launching shell, e.g. process substitution as the official demo does: --file 11 /etc/passwd ... 11< <(getent passwd $UID 65534).
  2. Copy bytes from an fd to a path: --file FD DEST.
  3. Bind-mount a file built from the fd's content (writable): --bind-data FD DEST.
  4. Read-only variant: --ro-bind-data FD DEST.
  5. Set explicit permissions by preceding the operation with --perms OCTAL — --perms 'does nothing on its own' and affects only the next option.
  6. Model on the demo, which synthesizes stub /etc/passwd and /etc/group this way (11< and 12< process substitutions).
  7. Remember these are one-shot copies taken at sandbox setup — not live bindings to the data's origin.
  8. Reference (official docs): https://raw.githubusercontent.com/containers/bubblewrap/main/bwrap.xml ; https://raw.githubusercontent.com/containers/bubblewrap/main/demos/bubblewrap-shell.sh

Known gotchas

Related routes

Inject generated configuration data, secrets, or a stub /etc/passwd into a bubblewrap (bwrap) sandbox directly from file descriptors, without writing temporary files to the host filesystem, using --file, --bind-data, --ro-bind-data, and --args.
github.com/containers/bubblewrap · 5 steps · unrated
Supervise a bwrap sandbox programmatically using --info-fd, --json-status-fd, --sync-fd and --lock-file
github.com/containers/bubblewrap · 9 steps · unrated
Supervise a bwrap sandbox programmatically using --info-fd, --json-status-fd, --sync-fd and --lock-file
github.com/containers/bubblewrap · 9 steps · unrated

Give your agent this knowledge — and 18,200+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans