|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
|
// examples at: https://github.com/devcontainers/templates |
|
{ |
|
"name": "${localWorkspaceFolderBasename}-dev", |
|
|
|
"runArgs": [ |
|
"--env=AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1", |
|
"--env=DISPLAY=${localEnv:DISPLAY}", |
|
"--env=QT_QPA_PLATFORM=xcb", |
|
"--env=QT_X11_NO_MITSHM=1", |
|
"--env=WAYLAND_DISPLAY=${localEnv:WAYLAND_DISPLAY}", |
|
"--name=${localWorkspaceFolderBasename}-dev", |
|
"--network=host", |
|
"--workdir=/opt/colcon_ws" |
|
|
|
], |
|
|
|
"build": { |
|
"dockerfile": "Dockerfile" |
|
}, |
|
|
|
"containerEnv": { |
|
"CONTAINER_WS_DIR": "${containerWorkspaceFolder}" |
|
}, |
|
|
|
// Features to add to the dev container. More info: https://containers.dev/features. |
|
// "features": {}, |
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally. |
|
// "forwardPorts": [], |
|
|
|
// Use 'postCreateCommand' to run commands after the container is created. |
|
"postCreateCommand": "/tmp/create_workspace.sh", |
|
|
|
// Configure tool-specific properties. |
|
// "customizations": {}, |
|
|
|
// Use the non-root user to help with permissions and GUI display. |
|
// Comment to connect as root (or other image default container) instead.. |
|
"remoteUser": "ubuntu", |
|
|
|
"mounts": [ |
|
"source=${localWorkspaceFolderBasename}_colcon_ws_volume,target=/opt/colcon_ws,type=volume,consistency=cached", |
|
"source=/dev/dri,target=/dev/dri,type=bind", |
|
"source=${localEnv:XAUTHORITY},target=/home/ubuntu/.Xauthority,type=bind,consistency=cached", |
|
] |
|
} |