From dac7602363134c2a8c58484a128720a74b2633c5 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Fri, 13 Sep 2024 11:03:10 -0300 Subject: [PATCH] VScode dev container work --- src/.devcontainer/devcontainer.json | 17 +++++++++++++++++ src/.vscode/tasks.json | 12 ++++++++++++ src/Dockerfile.jinja | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/.devcontainer/devcontainer.json create mode 100644 src/.vscode/tasks.json diff --git a/src/.devcontainer/devcontainer.json b/src/.devcontainer/devcontainer.json new file mode 100644 index 0000000..b714ece --- /dev/null +++ b/src/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +{ + "name": "ros1-catkit-devcontainer", + "dockerFile": "../Dockerfile", + "customizations": { + "vscode": { + "extensions": [ + // List of extensions to install in the dev container + ], + "settings": { + // Additional settings for the dev container + } + } + }, + "forwardPorts": [ + ], + "postCreateCommand": "/bin/bash -c 'source /opt/ros/noetic/setup.bash && catkin_make install'" +} diff --git a/src/.vscode/tasks.json b/src/.vscode/tasks.json new file mode 100644 index 0000000..abf7c10 --- /dev/null +++ b/src/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Update templates ", + "type": "shell", + "command": "find .copier/ -type f -exec copier update --skip-answered -a {} \\;" + } + ] +} diff --git a/src/Dockerfile.jinja b/src/Dockerfile.jinja index e9fefd0..483e412 100644 --- a/src/Dockerfile.jinja +++ b/src/Dockerfile.jinja @@ -11,7 +11,7 @@ RUN apt-get install --yes python3-rosdep python3-rosinstall python3-rosinstall-g WORKDIR /root/catkin_ws/src {% if SOURCE.startswith("git+") %} -RUN git clone https://github.com/ros-drivers/video_stream_opencv.git +RUN git clone {{source}} {% elif source %} COPY {{SOURCE}} . {% endif %}