Files
ros-devcontainer/devcontainer.json
2025-09-16 11:46:23 +02:00

60 lines
1.9 KiB
JSON

{
"name": "osrf/ros:jazzy-desktop-full-noble",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "ubuntu",
"runArgs": [
// "--cap-add=SYS_PTRACE", // Allows the container to trace processes using ptrace system call
// "--security-opt=seccomp=unconfined", // Disables seccomp security profiles for the container
// "--ipc=host", // Shares the host's IPC namespace with the container
"--network=host", // Shares the host's network namespace with the container
// "--pid=host", // Shares the host's PID namespace with the container
"--privileged", // Gives the container full access to the host's devices and allows it to run with root privileges
],
"initializeCommand": "xhost +local:docker", // Allows the container to access the X server on the host e.g. to run Rviz and other GUI tools
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/${localWorkspaceFolderBasename},type=bind",
"workspaceFolder": "/home/ubuntu/${localWorkspaceFolderBasename}",
"remoteEnv": {
"DISPLAY": "${localEnv:DISPLAY}",
"TZ": "Europe/Amsterdam"
},
"mounts": [
// Uncomment to allow the container to access the X server on the host e.g. to run Rviz and other GUI tools
{
"source": "/tmp/.X11-unix",
"target": "/tmp/.X11-unix",
"type": "bind"
},
// Uncomment to persist bash history between sessions
{
"source": "${localEnv:HOME}/.bash_history",
"target": "/home/ubuntu/.bash_history",
"type": "bind"
},
// add dri3
{
"source": "/dev/dri",
"target": "/dev/dri",
"type": "bind"
}
],
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"albert.tabout",
"eamodio.gitlens",
"donjayamanne.githistory",
"ms-python.vscode-pylance",
"ms-python.python",
"ms-vscode.cpptools",
"nonanonno.vscode-ros2",
"twxs.cmake"
]
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {}
},
}