Skip to content

Commit

Permalink
ogma-core: Add dockerfile. Refs #136.
Browse files Browse the repository at this point in the history
Ogma doesn't currently generate a Dockerfile with the ROS packages. That
makes it harder for users to know how to use the produce of Ogma.

This commit adds a Dockerfile to the ROS template used by Ogma, and to
the list of files installed with Ogma. The dockerfile simply compiles
the monitoring application inside Space ROS.
  • Loading branch information
ivanperez-keera committed May 21, 2024
1 parent 9e6ee42 commit c3c5063
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions ogma-core/ogma-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ data-files: templates/copilot-cfs/CMakeLists.txt
templates/copilot-cfs/fsw/src/copilot_cfs_version.h
templates/copilot-cfs/fsw/src/copilot_cfs.h
templates/copilot-cfs/fsw/src/copilot_cfs_events.h
templates/ros/Dockerfile
templates/ros/copilot/CMakeLists.txt
templates/ros/copilot/src/.keep
templates/ros/copilot/package.xml
Expand Down
16 changes: 16 additions & 0 deletions ogma-core/templates/ros/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM osrf/space-ros:latest

ARG USER=spaceros-user
ARG PACKAGE_PATH=/home/${USER}/monitors
ARG ROS_PATH=/home/${USER}/spaceros/

RUN mkdir -p ${PACKAGE_PATH}/src/
ADD copilot ${PACKAGE_PATH}/src/copilot
USER root
RUN chown -R ${USER} ${PACKAGE_PATH}
USER ${USER}

SHELL ["/bin/bash", "-c"]
WORKDIR ${PACKAGE_PATH}
RUN source ${ROS_PATH}/install/setup.bash && \
colcon build

0 comments on commit c3c5063

Please sign in to comment.