diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ea7145f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "name": "ROS2 Foxy", + "build": { + "dockerfile": "../Dockerfile", + "context": ".." + }, + "workspaceFolder": "/workspace", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + } + } + }, + "runArgs": [ + "--network=host", + "--cap-add=SYS_PTRACE", + "--security-opt=seccomp=unconfined" + ], + "postCreateCommand": "bash -c 'source /opt/ros/foxy/setup.bash && echo \"source /opt/ros/foxy/setup.bash\" >> ~/.bashrc'", + "remoteUser": "root" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..da57abd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +# Dockerfile for devcontainer of this repo + +FROM ros:foxy + +RUN apt update && apt install -y wget nano + +RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +RUN sudo dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb +RUN sudo apt update && sudo apt install -y dotnet-sdk-6.0 \ No newline at end of file diff --git a/README.md b/README.md index c1aeeee..a84a60f 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ colcon build --merge-install Linux ----- -Assuming ROS2 foxy installed to the standard location, run the following commands: +Assuming ROS2 foxy installed to the standard location (or use the provided devcontainer config), run the following commands: ``` source /opt/ros/foxy/setup.bash mkdir -p ~/ros2_dotnet_ws/src