-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
46 lines (35 loc) · 1006 Bytes
/
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
FROM ros:melodic-ros-base
ENV ROS_WS /ros
ENV PYTEST_ADDOPTS "--color=yes"
SHELL [ "bash", "-c"]
# Install pip
RUN apt update \
&& apt install -y \
libffi-dev \
libssl-dev \
python-pip \
&& pip install --no-cache-dir --upgrade pip \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Python testing packages
RUN pip install \
pytest \
pytest-cov \
coveralls
RUN pip install \
pyserial
COPY entrypoint.sh /
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "bash" ]
RUN echo "source /entrypoint.sh" >> /root/.bashrc && \
echo "source /root/.bashrc" >> /root/.bash_profile
RUN mkdir -p ${ROS_WS}/src
COPY . ${ROS_WS}/src/roboclaw_driver/
RUN cd ${ROS_WS} \
&& apt update \
&& rosdep update \
&& rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN source "/opt/ros/$ROS_DISTRO/setup.bash" && \
cd $ROS_WS && catkin_make && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /ros/src/roboclaw_driver