Repository navigation
Expand file tree
/
Copy pathcompose.override.example.yaml
More file actions
83 lines (82 loc) · 4.13 KB
/
Copy pathcompose.override.example.yaml
File metadata and controls
83 lines (82 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Local overrides, specific to this machine (not tracked by git):
# cp compose.override.example.yaml compose.override.yaml
# Docker Compose merges it with compose.yaml automatically.
# Empty by default: uncomment what you need.
services:
dev-box:
# Extra volumes (added to the ones from compose.yaml)
# volumes:
# - /srv/partage:/home/dev/partage
#
# Resource limits
# mem_limit: 8g
# cpus: 4
#
# Rootless podman inside the box (docker run/build/compose with no host
# socket). Turned on with PODMAN_ENABLE=true in .env. Found by trial,
# starting from nothing and adding only what unblocked something:
# - /dev/fuse: fuse-overlayfs, podman's image storage;
# - seccomp: the default Docker profile refuses clone(CLONE_NEWUSER), and
# podman stops on "cannot clone: Operation not permitted";
# - systempaths: Docker mounts /proc/sys read-only, crun cannot write
# net.ipv4.ping_group_range nor netavark route_localnet, so no container
# starts and no port is published;
# - apparmor: no effect on a host without AppArmor, required where it is
# active (Debian, Raspberry Pi OS).
# No --privileged and no CAP_SYS_ADMIN. The price: the isolation of the box
# itself is loosened (a container-to-host escape is easier).
# devices:
# - /dev/net/tun
# - /dev/fuse
# security_opt:
# - seccomp=unconfined
# - systempaths=unconfined
# - apparmor=unconfined
#
# Codex's own sandbox inside the box: Codex runs every command of the
# model through bubblewrap, which builds user, mount and pid namespaces.
# Without this block every command fails, read-only mode included, and
# the model answers without having run anything. Found by trial, like the
# podman block:
# - seccomp: the default Docker profile refuses clone(CLONE_NEWUSER),
# bwrap stops on "No permissions to create a new namespace";
# - systempaths: with the masked, read-only /proc of Docker, bwrap stops
# on "Can't mount proc on /proc: Operation not permitted";
# - apparmor: no effect on a host without AppArmor, required where it is
# active, as for podman.
# The podman block already holds these three lines: with it, add nothing
# (a second security_opt key would be refused). Same price as podman: the
# isolation of the box itself is loosened.
# security_opt:
# - seccomp=unconfined
# - systempaths=unconfined
# - apparmor=unconfined
#
# GPU of the host (Intel, AMD, the Raspberry Pi's): hardware video
# decoding and encoding (ffmpeg -hwaccel vaapi), OpenGL and Vulkan.
# The entrypoint adds the user to the group that owns /dev/dri, whatever
# its GID on the host; the drivers come with `devbox gpu install`. NVIDIA
# goes through the NVIDIA Container Toolkit instead. The host must have a
# /dev/dri (not Docker Desktop on macOS), or the container does not start.
# With the podman block, add /dev/dri to its devices list instead: a
# second devices key would be refused.
# devices:
# - /dev/dri
#
# An iPhone or iPad plugged into the host, for `devbox dev-env ios`: the
# USB bus as a volume, so that a device plugged in after the start shows
# up too (a devices entry would freeze the list at start), and the cgroup
# rule that lets the box open USB devices (character major 189). The box
# runs no udev and no systemd: start the daemon by hand, once the device
# is plugged in and unlocked, with `devbox pkg add usbmuxd` then
# `sudo usbmuxd`; `xtool devices` lists it once "Trust" is answered on its
# screen. Stop a usbmuxd running on the host first, the device has one
# owner (`sudo systemctl mask --now usbmuxd`, udev starts it again at
# each plug otherwise; unmask it to give the device back to the host).
# The whole bus is given: every USB device of the host is within
# reach of the box. A device plugged into another machine than this
# host needs none of this: `devbox help ios-usb` in the box.
# volumes:
# - /dev/bus/usb:/dev/bus/usb
# device_cgroup_rules:
# - 'c 189:* rmw'