Skip to content

Commit

Permalink
added bashrc commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimhroob committed Oct 30, 2024
1 parent 1987e3a commit f850933
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ FROM depbuilder as final

USER $USER

# include the file to configure the user's .bashrc
INCLUDE .devcontainer/docker_include/bashrc_config.dockerfile

CMD ["/bin/bash"]
4 changes: 4 additions & 0 deletions .devcontainer/docker_include/bashrc_config.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc && \
echo "source /usr/share/colcon_cd/function/colcon_cd.sh" >> ~/.bashrc && \
echo "export _colcon_cd_root=${COLCON_WS}" >> ~/.bashrc && \
echo "source ${COLCON_WS}/install/setup.bash" >> ~/.bashrc
2 changes: 1 addition & 1 deletion .devcontainer/docker_include/user_install.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ COPY .devcontainer/scripts/install_external_ros_packages.sh ${COLCON_WS}/src/ins
# Make the script executable and run it, then remove it
RUN /bin/bash -c '${COLCON_WS}/src/install_external_ros_packages.sh ${COLCON_WS}' && \
rm -f ${COLCON_WS}/src/install_external_ros_packages.sh && \
rm -f -r ${COLCON_WS}/src/repos
sudo rm -f -r ${COLCON_WS}/src/repos

USER root

0 comments on commit f850933

Please sign in to comment.