This repository has been archived by the owner on Nov 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
63 lines (50 loc) · 1.87 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
56
57
58
59
60
61
62
63
FROM ros:melodic-ros-base-bionic
SHELL [ "/bin/bash", "-c" ]
RUN adduser --quiet --disabled-password --shell /bin/bash \
--home /home/vortex --gecos "Vortex user for simulator" vortex
RUN echo "vortex:gladlaks" | chpasswd
RUN usermod -aG sudo vortex
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160
RUN apt-get update
# Accept software from packages.osrfoundation.org.
RUN apt-get install wget
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
RUN wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
RUN apt-get update
# Utility
RUN apt-get install -y --allow-unauthenticated \
openssh-server \
nano \
net-tools \
curl \
python-catkin-tools \
python-openpyxl \
python-dev \
python-pip
# Required packages
RUN apt-get install -y \
protobuf-compiler \
gazebo9 \
libgazebo9-dev \
ros-melodic-gazebo-plugins \
ros-melodic-gazebo-msgs \
ros-melodic-xacro \
ros-melodic-tf \
ros-melodic-robot-state-publisher \
ros-melodic-message-to-tf \
ros-melodic-image-view \
libeigen3-dev
# Pip packages
RUN pip install pymap3d==1.5.2
# Set up gazebo
RUN echo "export ROS_PACKAGE_PATH=/home/vortex/sim_ws:$ROS_PACKAGE_PATH" >> ~/.bashrc
RUN echo "export GAZEBO_MODEL_PATH=/home/vortex/sim_ws/src/manta_gazebo:$GAZEBO_MODEL_PATH" >> ~/.bashrc
# Source workspaces
RUN echo 'source /opt/ros/melodic/setup.bash' >> /home/vortex/.bashrc
RUN echo 'source ~/sim_ws/devel/setup.bash' >> /home/vortex/.bashrc
COPY ./pkg /home/vortex/sim_ws/src/pkg
COPY ./robots /home/vortex/sim_ws/src/robots
COPY ./uuv_simulator /home/vortex/sim_ws/src/uuv_simulator
RUN cd /home/vortex/sim_ws && source /opt/ros/melodic/setup.bash && catkin build
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]