BoxOptions
Options for constructing a box.Example
RootfsSpec
How to populate the box root filesystem.VolumeSpec
Filesystem mount specification.NetworkSpec
Network isolation options.PortSpec
Port mapping specification (host to guest).SecurityOptions
Security isolation options for a box.Presets
SecurityOptionsBuilder
Fluent builder for security options.Builder Methods
| Method | Description |
|---|---|
new() | Start from defaults |
development() | Start from dev preset |
standard() | Start from standard preset |
maximum() | Start from max preset |
jailer_enabled(bool) | Enable/disable jailer |
seccomp_enabled(bool) | Enable/disable seccomp |
uid(u32) | Set drop-to UID |
gid(u32) | Set drop-to GID |
new_pid_ns(bool) | Enable PID namespace |
new_net_ns(bool) | Enable network namespace |
chroot_base(path) | Set chroot base dir |
chroot_enabled(bool) | Enable chroot |
close_fds(bool) | Close inherited FDs |
sanitize_env(bool) | Sanitize environment |
env_allowlist(vec) | Set env allowlist |
allow_env(var) | Add to env allowlist |
resource_limits(limits) | Set all limits |
max_open_files(n) | RLIMIT_NOFILE |
max_file_size_bytes(n) | RLIMIT_FSIZE |
max_processes(n) | RLIMIT_NPROC |
max_memory_bytes(n) | RLIMIT_AS |
max_cpu_time_seconds(n) | RLIMIT_CPU |
sandbox_profile(path) | macOS sandbox profile |
network_enabled(bool) | macOS network access |
build() | Build SecurityOptions |