latest pushes
This commit is contained in:
parent
2897ca1529
commit
28957e5f52
@ -32,32 +32,33 @@ LABEL author=ronaldsonbellande@gmail.com
|
|||||||
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
|
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
|
||||||
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
|
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
|
||||||
|
|
||||||
# Create local catkin workspace and # copy every package
|
# Create local catkin workspace
|
||||||
RUN mkdir -p $CATKIN_WS/src
|
RUN mkdir -p $CATKIN_WS/src
|
||||||
|
|
||||||
|
# Copy Every Package
|
||||||
COPY ../ ${CATKIN_WS}/src
|
COPY ../ ${CATKIN_WS}/src
|
||||||
|
|
||||||
|
# Set the working directory for Catkin
|
||||||
WORKDIR $CATKIN_WS
|
WORKDIR $CATKIN_WS
|
||||||
|
|
||||||
# Set the working directory for catkin
|
# Initialize and configure catkin workspace
|
||||||
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash && \
|
||||||
|
cd $CATKIN_WS && \
|
||||||
|
catkin init && \
|
||||||
|
catkin config --extend /opt/ros/$ROS_VERSION && \
|
||||||
|
catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0"
|
||||||
|
|
||||||
# Initialize catkin workspace
|
# Install dependencies using rosdep
|
||||||
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash" \
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash && \
|
||||||
&& catkin init \
|
cd $CATKIN_WS && \
|
||||||
&& catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0
|
rosdep update && \
|
||||||
|
rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_VERSION"
|
||||||
# Initialize local catkin workspace, install dependencies and build workpsace
|
|
||||||
RUN echo "source /opt/ros/${ROS_VERSION}/setup.bash" >> ~/.bashrc \
|
|
||||||
&& source ~/.bashrc
|
|
||||||
|
|
||||||
RUN cd $CATKIN_WS \
|
|
||||||
&& rosdep update \
|
|
||||||
&& rosdep fix-permissions \
|
|
||||||
&& rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_VERSION}
|
|
||||||
|
|
||||||
# Always source catkin_setup.sh when launching bash
|
# Always source catkin_setup.sh when launching bash
|
||||||
COPY ../scripts/catkin_setup.sh /usr/local/bin/catkin_setup.sh
|
COPY ../scripts/catkin_setup.sh /usr/local/bin/catkin_setup.sh
|
||||||
RUN echo "source /usr/local/bin/catkin_setup.sh" >> /root/.bashrc
|
RUN echo "source /usr/local/bin/catkin_setup.sh" >> /root/.bashrc && \
|
||||||
RUN chmod +x /usr/local/bin/catkin_setup.sh
|
chmod +x /usr/local/bin/catkin_setup.sh
|
||||||
|
|
||||||
# Run the packages and source
|
# Run catkin setup script
|
||||||
RUN /usr/local/bin/catkin_setup.sh
|
RUN /usr/local/bin/catkin_setup.sh
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
|
@ -25,37 +25,53 @@ ARG ROS_ARCHITECTURE_VERSION_GIT_BRANCH=main
|
|||||||
ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD
|
ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD
|
||||||
|
|
||||||
ENV ROS_VERSION=foxy
|
ENV ROS_VERSION=foxy
|
||||||
ENV CATKIN_WS=/opt/ros/overlay_ws
|
ENV COLCON_WS=/opt/ros/overlay_ws
|
||||||
|
|
||||||
LABEL maintainer=ronaldsonbellande@gmail.com
|
LABEL maintainer=ronaldsonbellande@gmail.com
|
||||||
LABEL author=ronaldsonbellande@gmail.com
|
LABEL author=ronaldsonbellande@gmail.com
|
||||||
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
|
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
|
||||||
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
|
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
|
||||||
|
|
||||||
# Create local catkin workspace and # copy every package
|
# Install necessary tools
|
||||||
RUN mkdir -p $CATKIN_WS/src
|
RUN apt-get update && \
|
||||||
COPY ../ ${CATKIN_WS}/src
|
apt-get install -y python3-colcon-common-extensions python3-rosdep
|
||||||
WORKDIR $CATKIN_WS
|
|
||||||
|
|
||||||
# Initialize catkin workspace
|
# Initialize rosdep if not already initialized
|
||||||
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash" \
|
RUN if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then \
|
||||||
&& catkin init \
|
rosdep init; \
|
||||||
&& catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0
|
fi && \
|
||||||
|
rosdep update --include-eol-distros || \
|
||||||
|
{ echo "Retrying rosdep update..."; sleep 5; rosdep update --include-eol-distros; }
|
||||||
|
|
||||||
# Initialize local catkin workspace, install dependencies and build workpsace
|
# Create local colcon workspace
|
||||||
RUN echo "source /opt/ros/${ROS_VERSION}/setup.bash" >> ~/.bashrc \
|
RUN mkdir -p $COLCON_WS/src
|
||||||
&& source ~/.bashrc
|
|
||||||
|
|
||||||
RUN cd $CATKIN_WS \
|
# Copy Every Package
|
||||||
&& rosdep update \
|
COPY ../ ${COLCON_WS}/src
|
||||||
&& rosdep fix-permissions \
|
|
||||||
&& rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_VERSION}
|
# Set the working directory for Colcon
|
||||||
|
WORKDIR $COLCON_WS
|
||||||
|
|
||||||
|
# Source ROS setup.bash
|
||||||
|
RUN echo "source /opt/ros/$ROS_VERSION/setup.bash" >> ~/.bashrc
|
||||||
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash"
|
||||||
|
|
||||||
|
# Install dependencies using rosdep
|
||||||
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash && \
|
||||||
|
cd $COLCON_WS && \
|
||||||
|
rosdep update && \
|
||||||
|
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_VERSION"
|
||||||
|
|
||||||
|
# Build the workspace using colcon
|
||||||
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash && \
|
||||||
|
cd $COLCON_WS && \
|
||||||
|
colcon build --event-handlers console_cohesion+"
|
||||||
|
|
||||||
# Always source colcon_setup.sh when launching bash
|
# Always source colcon_setup.sh when launching bash
|
||||||
COPY ../scripts/colcon_setup.sh /usr/local/bin/colcon_setup.sh
|
COPY ../scripts/colcon_setup.sh /usr/local/bin/colcon_setup.sh
|
||||||
RUN echo "source /usr/local/bin/colcon_setup.sh" >> /root/.bashrc
|
RUN echo "source /usr/local/bin/colcon_setup.sh" >> /root/.bashrc && \
|
||||||
RUN chmod +x /usr/local/bin/colcon_setup.sh
|
chmod +x /usr/local/bin/colcon_setup.sh
|
||||||
|
|
||||||
# Run the packages and source
|
# Run colcon setup script
|
||||||
RUN /usr/local/bin/colcon_setup.sh
|
RUN /usr/local/bin/colcon_setup.sh
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
|
Loading…
Reference in New Issue
Block a user