chore(devcontainer): compatibility with podman

Podman is stricter than Docker.

Modify devcontainer.json so that it is possible to start the
devcontainer with podman. Also make sure that SELinux label are dropped
within the container otherwise the workspace is unusable.
These changes remain compatible with Docker.

_Note_ podman needs the option --userns=keep-id. However this would make
Docker break as it is an unsupported user mode. The solution is to add
this option to /etc/containers/container.conf.
This commit is contained in:
Polo 2024-07-06 17:37:25 +02:00 committed by Jan De Dobbeleer
parent 507f296124
commit 99c933a6a4

View file

@ -20,7 +20,16 @@
"PS_VERSION": "7.2.7" "PS_VERSION": "7.2.7"
} }
}, },
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], "runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--security-opt",
"label=disable"
],
"containerEnv": {
"HOME": "/home/vscode"
},
"customizations": { "customizations": {
"vscode": { "vscode": {