diff --git a/docker/Dockerfile.ros2humble b/docker/Dockerfile.ros2humble new file mode 100644 index 0000000..fdfdcea --- /dev/null +++ b/docker/Dockerfile.ros2humble @@ -0,0 +1,55 @@ +# This is an auto generated Dockerfile for ros:ros-base +# generated from docker_images_ros2/create_ros_image.Dockerfile.em +FROM ros:humble-ros-core-jammy + +# install bootstrap tools +RUN apt-get update && apt-get install --no-install-recommends -y \ + build-essential \ + git \ + python3-colcon-common-extensions \ + python3-colcon-mixin \ + python3-rosdep \ + python3-vcstool \ + && rm -rf /var/lib/apt/lists/* + +# bootstrap rosdep +RUN rosdep init && \ + rosdep update --rosdistro $ROS_DISTRO + +# setup colcon mixin and metadata +RUN colcon mixin add default \ + https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml && \ + colcon mixin update && \ + colcon metadata add default \ + https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \ + colcon metadata update + +# install ros2 packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + ros-humble-ros-base=0.10.0-1* \ + && rm -rf /var/lib/apt/lists/* + +ARG USERNAME=ros +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# Create a non-root user +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ + # Add sudo support for the non-root user + && apt-get update \ + && apt-get install -y sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ + && chmod 0440 /etc/sudoers.d/$USERNAME \ + && rm -rf /var/lib/apt/lists/* + +# Set up autocompletion for user +RUN apt-get update && apt-get install -y git-core bash-completion \ + && echo "if [ -f /opt/ros/${ROS_DISTRO}/setup.bash ]; then source /opt/ros/${ROS_DISTRO}/setup.bash; fi" >> /home/$USERNAME/.bashrc \ + && echo "if [ -f /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash ]; then source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash; fi" >> /home/$USERNAME/.bashrc \ + && rm -rf /var/lib/apt/lists/* + + +RUN mkdir /workspace + +ENTRYPOINT [ "/bin/bash", "-l", "-c" ] \ No newline at end of file diff --git a/docker/Dockerfile.ros2humble.l4t-r32.7.1 b/docker/Dockerfile.ros2humble.l4t-r32.7.1 new file mode 100644 index 0000000..bd2c063 --- /dev/null +++ b/docker/Dockerfile.ros2humble.l4t-r32.7.1 @@ -0,0 +1,26 @@ +FROM dustynv/ros:humble-ros-base-l4t-r32.7.1 + +ARG USERNAME=ros +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# Create a non-root user +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ + # Add sudo support for the non-root user + && apt-get update \ + && apt-get install -y sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ + && chmod 0440 /etc/sudoers.d/$USERNAME \ + && rm -rf /var/lib/apt/lists/* + +# Set up autocompletion for user +RUN apt-get update && apt-get install -y git-core bash-completion \ + && echo "if [ -f /opt/ros/${ROS_DISTRO}/setup.bash ]; then source /opt/ros/${ROS_DISTRO}/setup.bash; fi" >> /home/$USERNAME/.bashrc \ + && echo "if [ -f /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash ]; then source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash; fi" >> /home/$USERNAME/.bashrc \ + && rm -rf /var/lib/apt/lists/* + + +RUN mkdir /workspace + +ENTRYPOINT [ "/bin/bash", "-l", "-c" ] \ No newline at end of file