-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile_dev
More file actions
40 lines (34 loc) · 1.39 KB
/
Dockerfile_dev
File metadata and controls
40 lines (34 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM kristoferb/spbase_ros2:galactic
SHELL ["/bin/bash", "-c"]
ARG project_name=tf_sms
# install any deps here and clone any external repos into the workspace
COPY ../tf_bringup/ /ws/src/tf_bringup/
COPY ../tf_broadcast/ /ws/src/tf_broadcast/
COPY ../tf_scenario_loader/ /ws/src/tf_scenario_loader/
COPY ../tf_lookup/ /ws/src/tf_lookup/
COPY ../tf_tools_msgs/ /ws/src/tf_tools_msgs/
# Copy the packages and only the rust package and cargo files to build the rust deps.
# these files can not be changed when working in the container
COPY ./$project_name/Cargo.* \
./$project_name/package.xml \
./$project_name/r2r_cargo.cmake \
./$project_name/CMakeLists.txt \
/ws/src/$project_name/
RUN . /opt/ros/$ROS_DISTRO/setup.bash &&\
cd /ws &&\
mkdir ./src/$project_name/src/ &&\
echo "fn main() {}" > ./src/$project_name/src/tf_sms.rs &&\
echo "fn main() {}" > ./src/$project_name/src/tf_sms_test_client.rs &&\
colcon build
# remove code that should be mounted
RUN rm -r /ws/src/$project_name/src/ &&\
rm -r /ws/src/tf_bringup/ &&\
rm -r /ws/src/tf_broadcast/ &&\
rm -r /ws/src/tf_scenario_loader/ &&\
rm -r /ws/src/tf_lookup/ &&\
rm -r /ws/src/tf_tools_msgs/
RUN sed --in-place --expression \
'$isource "/ws/install/setup.bash"' \
/entrypoint.sh
RUN echo '. /opt/ros/$ROS_DISTRO/setup.bash' >> ~/.bashrc
RUN echo '. /ws/install/setup.bash' >> ~/.bashrc