-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
55 lines (51 loc) · 1.64 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
FROM ros:melodic
MAINTAINER Matt Vollrath <[email protected]>
ARG BUILD_DEBS='false'
# install system dependencies
RUN apt-get update \
&& apt-get install -y \
git \
g++ \
pep8 \
openssh-client \
python-catkin-lint \
python3-pip \
python3-nose \
&& pip3 install setuptools \
&& pip3 install wheel pyyaml rospkg \
&& rm -rf /var/lib/apt/lists/*
ENV CATKIN_WS /catkin_ws
ENV DEP_WS /dep_ws
RUN mkdir -p $CATKIN_WS/src \
&& . /opt/ros/melodic/setup.sh \
&& catkin_init_workspace $CATKIN_WS/src \
&& echo '#!/bin/bash' > /ros_entrypoint.sh \
&& echo 'source $CATKIN_WS/devel/setup.bash' >> /ros_entrypoint.sh \
&& echo 'exec "$@"' >> /ros_entrypoint.sh
# Install lg-ros-build, only if we are building debs or we are running on CI
RUN if [ "$BUILD_DEBS" = "true" ]; then \
. /opt/ros/melodic/setup.sh \
&& mkdir -p $DEP_WS/src \
&& catkin_init_workspace $DEP_WS/src \
&& cd $DEP_WS \
&& git clone https://github.com/EndPointCorp/lg_ros_nodes --depth 1 /tmp/lg_ros_nodes \
&& ln -snf /tmp/lg_ros_nodes/lg_builder $DEP_WS/src/ \
&& apt-get update \
&& apt-get -y install debhelper \
&& rosdep update \
&& rosdep install -y --from-paths $DEP_WS/src --ignore-src --rosdistro=melodic \
&& catkin_make \
&& catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/melodic \
&& rm -rf /tmp/lg_ros_nodes \
&& rm -rf $DEP_WS \
&& mkdir /output \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf ~/.ros \
;fi
WORKDIR $CATKIN_WS
COPY appctl $CATKIN_WS/src/appctl
COPY setup.cfg $CATKIN_WS/setup.cfg
COPY pack-debs $CATKIN_WS/pack-debs
COPY appctl_msg_defs $CATKIN_WS/src/appctl_msg_defs
RUN . /opt/ros/melodic/setup.sh \
&& catkin_make