Initial shared dev container
This commit is contained in:
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM osrf/ros:jazzy-desktop-full-noble
|
||||
|
||||
SHELL [ "/bin/bash" , "-c" ]
|
||||
|
||||
# Add sourcing ROS setup.bash to .bashrc
|
||||
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc
|
||||
RUN echo "source /usr/share/colcon_cd/function/colcon_cd.sh" >> ~/.bashrc
|
||||
RUN echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> ~/.bashrc
|
||||
RUN echo "export _colcon_cd_root=/opt/ros/jazzy/" >> ~/.bashrc
|
||||
61
devcontainer.json
Normal file
61
devcontainer.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "osrf/ros:jazzy-desktop-full-noble",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
"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
|
||||
],
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/${localWorkspaceFolderBasename},type=bind",
|
||||
"workspaceFolder": "/${localWorkspaceFolderBasename}",
|
||||
// for linux
|
||||
"containerEnv": {
|
||||
// Uncomment to allow the container to access the X server on the host e.g. to run Rviz and other GUI tools
|
||||
"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}${localEnv:USERPROFILE}/.bash_history",
|
||||
"target": "/root/.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",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"ranch-hand-robotics.rde-pack",
|
||||
"nonanonno.vscode-ros2"
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/common-utils:2": {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user