This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
forked from RethinkRobotics/baxter_simulator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
48 lines (41 loc) · 1.74 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
# vicariousinc/baxter-simulator:kinetic
# Run simulated Baxter in Gazebo
FROM osrf/ros:kinetic-desktop-full
MAINTAINER Dave Coleman [email protected]
ENV TERM xterm
# Setup catkin workspace
ENV CATKIN_WS=/root/ws_baxter
RUN mkdir -p $CATKIN_WS/src
WORKDIR $CATKIN_WS/src
# Download source code
RUN wstool init . && \
wstool merge https://raw.githubusercontent.com/vicariousinc/baxter_simulator/${ROS_DISTRO}-gazebo7/baxter_simulator.rosinstall && \
wstool update
# Update apt-get because previous images clear this cache
# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
RUN apt-get -qq update && \
# Install some base dependencies
apt-get -qq install -y \
# Some source builds require a package.xml be downloaded via wget from an external location
wget \
# Required for rosdep command
sudo \
# Required for installing dependencies
python-rosdep \
# Preferred build tool
python-catkin-tools && \
# Download all dependencies
rosdep update && \
rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \
# Clear apt-cache to reduce image size
rm -rf /var/lib/apt/lists/*
# Replacing shell with bash for later docker build commands
RUN mv /bin/sh /bin/sh-old && \
ln -s /bin/bash /bin/sh
# Build repo
WORKDIR $CATKIN_WS
ENV PYTHONIOENCODING UTF-8
RUN catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release && \
# Status rate is limited so that just enough info is shown to keep Docker from timing out, but not too much
# such that the Docker log gets too long (another form of timeout)
catkin build --jobs 1 --limit-status-rate 0.001 --no-notify