-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (34 loc) · 1.19 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
## Setup general ROS stuff
# See: https://hub.docker.com/r/osrf/ros
# See: https://ros.org/reps/rep-0150.html
FROM osrf/ros:noetic-desktop-full-focal
# Used to access local X server
USER root
# Catkin related
ENV CATKIN_WS /root/catkin_ws/
RUN mkdir -p ${CATKIN_WS}/src/travesim
RUN mkdir -p ${CATKIN_WS}/src/travesim_adapters
WORKDIR ${CATKIN_WS}
# Initialize catkin workspace
RUN /ros_entrypoint.sh catkin_make
# Docker best practices: install dependencies before copying all source code
COPY travesim/package.xml src/${PROJECT_NAME}/travesim
COPY travesim_adapters/package.xml src/${PROJECT_NAME}/travesim_adapters
RUN . devel/setup.sh && \
apt update --fix-missing && \
rosdep install -y travesim travesim_adapters
COPY travesim src/travesim/
COPY travesim_adapters src/travesim_adapters/
# Compile any source code whitin the simulation
RUN /ros_entrypoint.sh catkin_make
RUN mkdir -m 700 /tmp/runtime
ENV XDG_RUNTIME_DIR=/tmp/runtime
# Expose adapters default ports
EXPOSE 10002
EXPOSE 20011
EXPOSE 20012
EXPOSE 20013
# User options
ENV GUI 1
ENV ROBOTS_PER_TEAM 3
CMD . devel/setup.sh && roslaunch travesim_adapters adapters.launch gui:=${GUI} robots_per_team:=${ROBOTS_PER_TEAM} sound:=0