1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-04-02 00:07:16 +01:00

Adapt devcontainer.json for systemd-based devcontainer image

Update devcontainer.json settings to work with the new systemd-based
devcontainer image (v4).

- Bump image tag to 4-supervisor to get the systemd-enabled image
- Set overrideCommand to false so the image's CMD (/sbin/init) runs
  as PID 1 instead of being replaced by VS Code's default sleep command
- Set remoteUser to vscode to preserve the non-root shell experience
  (required when overrideCommand is false, since VS Code no longer
  injects its own user-switching wrapper)
- Add /var/lib/containerd volume mount because modern Docker uses the
  containerd snapshotter, which stores layer data outside
  /var/lib/docker
- Add tmpfs on /tmp to match typical systemd expectations and avoid
  leftover state across container restarts
This commit is contained in:
Stefan Agner
2026-04-01 08:38:32 +00:00
parent 31636fe310
commit 44dccddd36

View File

@@ -1,6 +1,8 @@
{
"name": "Supervisor dev",
"image": "ghcr.io/home-assistant/devcontainer:3-supervisor",
"image": "ghcr.io/home-assistant/devcontainer:4-supervisor",
"overrideCommand": false,
"remoteUser": "vscode",
"containerEnv": {
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
},
@@ -46,6 +48,8 @@
},
"mounts": [
"type=volume,target=/var/lib/docker",
"type=volume,target=/mnt/supervisor"
"type=volume,target=/var/lib/containerd",
"type=volume,target=/mnt/supervisor",
"type=tmpfs,target=/tmp"
]
}