-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
44 lines (36 loc) · 1.23 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
ARG ARCH=arm32v7
ARG ROS_DISTRO=melodic
FROM ${ARCH}ros:${ROS_DISTRO}
SHELL ["/bin/bash","-c"]
# Package install without prompts, using defaults
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --force-yes --no-install-recommends \
sudo \
nano \
vim \
net-tools \
# avoids warnings in logs
apt-utils \
# For use with rosdep
python-pip \
# Clear apt-cache to reduce image size
&& rm -rf /var/lib/apt/lists/*
# Create local catkin workspace
ENV CATKIN_WS=/root/catkin_ws
RUN mkdir -p $CATKIN_WS/src
WORKDIR $CATKIN_WS/src
COPY . $CATKIN_WS/src/rasptank/
# Add robot packages to local catkin workspace
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
# Update apt-get because its cache is always cleared after installs to keep image size down
&& apt-get update \
# Install dependencies
&& cd $CATKIN_WS \
&& rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} \
# Build catkin workspace
&& catkin_make \
# Clear apt-cache to reduce image size
&& rm -rf /var/lib/apt/lists/*
COPY ./ros_catkin_entrypoint.sh /
ENTRYPOINT ["/ros_catkin_entrypoint.sh"]
CMD ["roslaunch rasptank rasptank.launch"]