-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/docker_test' into development
- Loading branch information
Showing
3 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
#!/bin/bash -e | ||
echo "Copy Source Files..." | ||
cp -r /source/ /catkin_ws/src/mars_ros | ||
echo "Building the Appliaction..." | ||
cd /catkin_ws | ||
echo "Copyiing Source Files..." | ||
cp -r /source/ /catkin_build_ws/src/mars_ros | ||
cp -r /source/ /catkin_make_ws/src/mars_ros | ||
|
||
# build with catkin build | ||
echo "Building the Appliaction with 'catkin build' ..." | ||
cd /catkin_build_ws | ||
catkin build -DCMAKE_BUILD_TYPE=Release | ||
catkin build -DCMAKE_BUILD_TYPE=Debug | ||
echo "Building the Appliaction with 'catkin build' - DONE" | ||
# clean workspace to free up used disk space | ||
catkin clean -y | ||
rm -rf .catkin_tools | ||
|
||
# build with catkin_make | ||
echo "Building the Appliaction with 'catkin_make' ..." | ||
cd /catkin_make_ws | ||
catkin_make -DCMAKE_BUILD_TYPE=Release | ||
catkin_make -DCMAKE_BUILD_TYPE=Debug | ||
echo "Building the Appliaction with 'catkin_make' - DONE" | ||
# clean workspace to free up used disk space | ||
rm -rf build develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,50 @@ | ||
FROM ros:noetic-ros-core | ||
# Copyright (C) 2022 Christian Brommer and Martin Scheiber, | ||
# Control of Networked Systems, University of Klagenfurt, Austria. | ||
# | ||
# All rights reserved. | ||
# | ||
# This software is licensed under the terms of the BSD-2-Clause-License with | ||
# no commercial use allowed, the full terms of which are made available | ||
# in the LICENSE file. No license in patents is granted. | ||
# | ||
# You can contact the author at <christian.brommer@ieee.org> | ||
# and <martin.scheiber@ieee.org>. | ||
|
||
FROM ros:noetic-ros-core as stage1 | ||
LABEL author="Christian Brommer <christian.brommer@aau.at>" | ||
LABEL author="Martin Scheiber <martin.scheiber@aau.at>" | ||
LABEL maintainer="Christian Brommer <christian.brommer@aau.at>" | ||
LABEL description="Mars Ros Wrapper Test Environment" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
vim \ | ||
wget \ | ||
doxygen \ | ||
graphviz \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
libeigen3-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
python3-catkin-tools \ | ||
ros-noetic-dynamic-reconfigure \ | ||
ros-noetic-tf2-ros \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /catkin_build_ws/src \ | ||
&& mkdir -p /catkin_make_ws/src | ||
|
||
RUN mkdir -p /catkin_ws/src | ||
WORKDIR /catkin_ws | ||
RUN /bin/bash -c '. /opt/ros/noetic/setup.bash; catkin build' | ||
WORKDIR /catkin_build_ws | ||
RUN /bin/bash -c "source /opt/ros/noetic/setup.sh; rosdep init && rosdep update; \ | ||
source /opt/ros/noetic/setup.sh; catkin init; catkin config --extend /opt/ros/noetic; \ | ||
source /opt/ros/noetic/setup.sh; catkin build;" | ||
|
||
WORKDIR /catkin_make_ws | ||
RUN /bin/bash -c "source /opt/ros/noetic/setup.sh; catkin_make;" | ||
|
||
COPY ./docker_application_test.sh / | ||
|
||
# flatten image | ||
FROM scratch as final | ||
COPY --from=stage1 / / | ||
|
||
ENTRYPOINT ["/bin/bash"] | ||
CMD /docker_application_test.sh |