The LGDXRobot2 ROS 2 Docker image comes with development tools installed, allowing custom ROS 2 packages to be developed. This tutorial shows how to build custom ROS 2 package. It is based on the ROS 2 documentation.
mkdir -p ~/my_ws/src
cd ~/my_ws/src
git clone https://github.com/ros/ros_tutorials.git -b jazzy
docker run -d \
--name lgdxrobot2 \
-e PUID=1000 \
-e PGID=1000 \
-v ~/my_ws/src:/config/my_ws/src \
-p 3000:3000 \
-p 3001:3001 yukaitung/lgdxrobot2-desktop:latest
sudo chown -R 1000:1000 ~/my_ws
cd my_ws
rosdep install -i --from-path src --rosdistro jazzy -y
colcon build
source install/local_setup.bash
ros2 run turtlesim turtlesim_node
