-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy pathdev-overlay.Dockerfile
More file actions
61 lines (35 loc) · 1.21 KB
/
dev-overlay.Dockerfile
File metadata and controls
61 lines (35 loc) · 1.21 KB
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
FROM nvidia-ros-noetic:latest
SHELL [ "/bin/bash", "-c" ]
# Set env variables for rosdep
ENV ROS_PYTHON_VERSION=3
ENV ROS_DISTRO=noetic
# Create new user with full permission to the volume mount
RUN useradd --create-home appuser
# Copy the src folder for volume mount
USER appuser
WORKDIR /appuser
RUN mkdir -p catkin_ws/src
COPY ./src catkin_ws/src
# Run rosdep to install dependencies
USER root
WORKDIR /appuser/catkin_ws
RUN apt-get update --fix-missing \
&& rosdep update
RUN rosdep install --from-paths src --ignore-src -r -y
# Download Gazebo models
USER appuser
WORKDIR /home/appuser
RUN git clone https://github.com/osrf/gazebo_models.git
RUN mkdir -p .gazebo/models \
&& cp -r gazebo_models/* .gazebo/models \
&& cp -r /appuser/catkin_ws/src/me5413_world/models/* .gazebo/models
# Put your code here to run additional commands
#######################################################################
#######################################################################
# Build the entire package
USER appuser
WORKDIR /appuser/catkin_ws
RUN source /opt/ros/noetic/setup.bash \
&& catkin config --install \
&& catkin build
RUN echo "source /appuser/catkin_ws/devel/setup.bash" >> ~/.bashrc