From 462dce9de3b4c1421dc502c398ccee55f51c7ca0 Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:38:12 +0200 Subject: [PATCH] Update dockerfile.arm64 --- dockerfile.arm64 | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/dockerfile.arm64 b/dockerfile.arm64 index 54d2959..773131a 100644 --- a/dockerfile.arm64 +++ b/dockerfile.arm64 @@ -31,31 +31,41 @@ FROM ros:humble # && rm -rf /var/lib/apt/lists/* # Create a non-root user to run the container -RUN groupadd -r ros && useradd -r -g ros ros -RUN mkdir -p /home/ros -RUN chown -R ros /home/ros -USER ros +# RUN groupadd -r ros && useradd -r -g ros ros +# USER ros # Create a workspace directory and copy your project into it -RUN mkdir -p /home/ros/workspace/src -WORKDIR /home/ros/workspace/src +# RUN mkdir -p /home/ros/workspace/src +# WORKDIR /home/ros/workspace/src +# RUN git clone https://github.com/bjoernellens1/segway_msgs +# RUN git clone https://github.com/bjoernellens1/segwayrmp -b x86 + +RUN mkdir -p /root/workspace/src +WORKDIR /root/workspace/src RUN git clone https://github.com/bjoernellens1/segway_msgs RUN git clone https://github.com/bjoernellens1/segwayrmp -b humble-arm64 - +RUN git clone https://github.com/bjoernellens1/rmp220_teleop # Build the workspace -WORKDIR /home/ros/workspace +# WORKDIR /home/ros/workspace +# RUN . /opt/ros/humble/setup.sh && \ +# colcon build +WORKDIR /root/workspace RUN . /opt/ros/humble/setup.sh && \ colcon build -#WORKDIR /home/ros/workspace +RUN apt update && apt install -y ros-humble-joy +RUN apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# Set up the ROS environment -RUN echo "source /opt/ros/humble/setup.bash" >> /home/ros/.bashrc && \ - echo "source /home/ros/workspace/install/setup.bash" >> /home/ros/.bashrc # Set the entrypoint to the workspace and run the shell -#ENTRYPOINT ["/bin/bash", "-c", ". /opt/ros/humble/setup.bash && cd /home/ros/workspace && source /home/ros/workspace/install/setup.bash && /bin/bash"] +#ENTRYPOINT ["/bin/bash", "-c", ". /opt/ros/humble/setup.sh && . install/setup.sh && /bin/bash"] + +# Set up the ROS environment +# RUN echo "source /opt/ros/humble/setup.bash" >> /home/ros/.bashrc && \ +# echo "source /home/ros/workspace/install/setup.bash" >> /home/ros/.bashrc +RUN echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc && \ + echo "source /root/workspace/install/setup.bash" >> /root/.bashrc # Set the default command to start a new shell in the workspace CMD ["/bin/bash"]