-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (56 loc) · 1.92 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM ros:melodic
MAINTAINER Matt Vollrath <[email protected]>
ARG BUILD_DEBS='false'
# install system dependencies
RUN apt-get update \
&& apt-get install -y \
curl \
git \
g++ \
pep8 \
closure-linter \
python-catkin-lint \
libfontconfig \
&& if [ "$BUILD_DEBS" = "true" ]; then \
apt-get install -y \
debhelper \
;fi \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get -y install nodejs \
&& rm -rf /var/lib/apt/lists/*
ENV THIS_PROJECT command_handler
ENV CATKIN_WS /catkin_ws
RUN echo '#!/bin/bash' > /ros_entrypoint.sh \
&& echo 'source $CATKIN_WS/devel/setup.bash' >> /ros_entrypoint.sh \
&& echo 'exec "$@"' >> /ros_entrypoint.sh
# Set up a catkin workspace complete with built run deps
RUN mkdir -p $CATKIN_WS/src \
&& . /opt/ros/melodic/setup.sh \
&& catkin_init_workspace $CATKIN_WS/src \
&& git clone https://github.com/EndPointCorp/appctl /tmp/appctl \
&& git clone https://github.com/EndPointCorp/lg_ros_nodes /tmp/lg_ros_nodes \
&& ln -snf /tmp/appctl $CATKIN_WS/src/ \
&& ln -snf /tmp/lg_ros_nodes/lg_common $CATKIN_WS/src/ \
&& ln -snf /tmp/lg_ros_nodes/lg_msg_defs $CATKIN_WS/src/ \
&& ln -snf /tmp/lg_ros_nodes/interactivespaces_msgs $CATKIN_WS/src/ \
&& if [ "$BUILD_DEBS" = "true" ]; then \
ln -snf /tmp/lg_ros_nodes/lg_builder $CATKIN_WS/src/ \
&& mkdir /output \
;fi \
&& apt-get update \
&& rosdep update \
&& rosdep install -y --from-paths $CATKIN_WS/src --ignore-src --rosdistro=melodic \
&& rm -rf /var/lib/apt/lists/*
# Install deps for this package
COPY package.xml /tmp/$THIS_PROJECT
RUN cd $CATKIN_WS \
&& . /opt/ros/melodic/setup.sh \
&& apt-get update \
&& rosdep install -y --from-paths /tmp/$THIS_PROJECT --ignore-src --rosdistro=melodic \
&& rm -rf /var/lib/apt/lists/*
# Build this package
COPY . $CATKIN_WS/src/$THIS_PROJECT
RUN cd $CATKIN_WS \
&& . /opt/ros/melodic/setup.sh \
&& catkin_make
WORKDIR $CATKIN_WS