1
1
# Ubuntu 18.04 with nvidia-docker2 beta opengl support
2
- FROM nvidia/opengl:1.0-glvnd-devel-ubuntu18.04
3
-
4
- RUN export DEBIAN_FRONTEND=noninteractive \
5
- && apt-get update \
6
- && apt-get install -y \
7
- tzdata \
8
- && ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime \
9
- && dpkg-reconfigure --frontend noninteractive tzdata \
10
- && apt-get clean
2
+ FROM osrf/subt-virtual-testbed:models_latest
11
3
12
4
# Tools I find useful during development
13
- RUN apt-get update -qq \
14
- && apt-get install --no-install-recommends -y -qq \
5
+ RUN sudo apt-get update -qq \
6
+ && sudo apt-get install --no-install-recommends -y -qq \
15
7
build-essential \
16
8
bwm-ng \
17
9
atop \
18
10
cmake \
19
11
cppcheck \
20
12
gdb \
21
13
git \
14
+ gnutls-bin \
22
15
libbluetooth-dev \
23
16
libccd-dev \
24
17
libcwiid-dev \
@@ -41,16 +34,16 @@ RUN apt-get update -qq \
41
34
wget \
42
35
net-tools \
43
36
iputils-ping \
44
- && apt-get clean -qq
37
+ && sudo apt-get clean -qq
45
38
46
39
# Install AWS CLI. This is needed by cloudsim to capture ROS logs.
47
40
RUN pip3 install --upgrade awscli=="1.16.220"
48
41
VOLUME /root/.aws
49
42
50
43
# install ROS and required packages
51
- RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' \
52
- && apt-get update \
53
- && apt-get install -y \
44
+ RUN sudo /bin/sh -c 'echo "deb [trusted=yes] http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' \
45
+ && sudo apt-get update \
46
+ && sudo apt-get install -y \
54
47
python-catkin-tools \
55
48
python-rosdep \
56
49
python-rosinstall \
@@ -63,34 +56,22 @@ RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.ros.org/ros/ubuntu $(lsb
63
56
ros-melodic-twist-mux \
64
57
ros-melodic-rviz-imu-plugin \
65
58
ros-melodic-rotors-control \
66
- && rosdep init \
67
- && apt-get clean
59
+ ros-melodic-theora-image-transport \
60
+ && sudo rosdep init \
61
+ && sudo apt-get clean
68
62
69
63
# sdformat8-sdf conflicts with sdformat-sdf installed from gazebo
70
64
# so we need to workaround this using a force overwrite
71
65
# Do this before installing ign-gazebo
72
- RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' \
73
- && /bin/sh -c 'wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -' \
74
- && /bin/sh -c 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'
75
-
76
- # install ign-blueprint and the ign-bridge
77
- RUN apt-get update \
78
- && apt-get install -y \
79
- ignition-blueprint \
80
- ros-melodic-ros-ign \
81
- && apt-get clean
82
-
83
- # Add a user with the same user_id as the user outside the container
84
- # Requires a docker build argument `user_id`
85
- ARG user_id
86
- ENV USERNAME developer
87
- RUN useradd -U --uid ${user_id} -ms /bin/bash $USERNAME \
88
- && echo "$USERNAME:$USERNAME" | chpasswd \
89
- && adduser $USERNAME sudo \
90
- && echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/$USERNAME
66
+ RUN sudo /bin/sh -c 'echo "deb [trusted=yes] http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' \
67
+ && sudo /bin/sh -c 'wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -' \
68
+ && sudo /bin/sh -c 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'
91
69
92
- # Commands below run as the developer user
93
- USER $USERNAME
70
+ # install ign-dome and the ign-bridge
71
+ RUN sudo apt-get update \
72
+ && sudo apt-get install -y \
73
+ ignition-dome \
74
+ && sudo apt-get clean
94
75
95
76
# Make a couple folders for organizing docker volumes
96
77
RUN mkdir ~/workspaces ~/other
@@ -104,16 +85,13 @@ RUN rosdep update
104
85
# docker is run
105
86
RUN mkdir -p subt_ws/src \
106
87
&& cd subt_ws/src \
88
+ && git config --global http.postBuffer 1048576000 \
89
+ && git clone https://github.com/ignitionrobotics/ros_ign -b melodic \
107
90
&& git clone https://github.com/osrf/subt
108
91
109
92
WORKDIR /home/$USERNAME/subt_ws
110
93
111
- # Install Rotors
112
- # RUN wget https://s3.amazonaws.com/osrf-distributions/subt_robot_examples/releases/subt_robot_examples_latest.tgz
113
- # RUN tar xvf subt_robot_examples_latest.tgz
114
-
115
94
RUN /bin/bash -c 'source /opt/ros/melodic/setup.bash && catkin_make install'
116
-
117
95
RUN /bin/sh -c 'echo ". /opt/ros/melodic/setup.bash" >> ~/.bashrc' \
118
96
&& /bin/sh -c 'echo ". ~/subt_ws/install/setup.sh" >> ~/.bashrc'
119
97
0 commit comments