-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-minimal.rosjetson
50 lines (41 loc) · 1.75 KB
/
Dockerfile-minimal.rosjetson
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
# https://developer.nvidia.com/embedded/jetson-linux-archive
# https://hub.docker.com/r/stereolabs/zed
ARG ZED_SDK_MAJOR
ARG ZED_SDK_MINOR
ARG L4T_MINOR_VERSION
ARG L4T_MAJOR_VERSION
# Specify the parent image from which we build
FROM stereolabs/zed:${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}-tools-devel-l4t-r${L4T_MAJOR_VERSION}.${L4T_MINOR_VERSION}
ARG ROS_DISTRO_ARG
ENV ROS_DISTRO ${ROS_DISTRO_ARG}
ENV DEBIAN_FRONTEND noninteractive
# Setup ROS
RUN apt-get update -y || true && \
apt-get upgrade -y && \
apt-get install -y tzdata curl && \
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && \
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
apt-get update -y || true &&\
apt-get install --no-install-recommends -y ros-${ROS_DISTRO}-ros-base cmake usbutils git libusb-1.0-0-dev -y --allow-unauthenticated && \
apt-get install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool &&\
apt-get install -y ros-noetic-catkin python3-catkin-tools python3-osrf-pycommon && \
rm -rf /var/lib/apt/lists/*
#Setup ROS workspace
ENV ROS_WS /opt/ros_ws
RUN mkdir -p ${ROS_WS}/src
# 'src' folder setup
COPY src ${ROS_WS}/src
WORKDIR ${ROS_WS}/src
# Installing ros dependencies of workspace
RUN apt-get update && \
rosdep init && \
rosdep update && \
rosdep install -y --from-paths . --ignore-src --rosdistro noetic && \
rm -rf /var/lib/apt/lists/*
# Building workspace
WORKDIR ${ROS_WS}
RUN . /opt/ros/noetic/setup.sh && catkin config --extend /opt/ros/noetic --cmake-args -DCMAKE_BUILD_TYPE=Release && catkin build
# Setup entrypoint
COPY ./ros_entrypoint.sh /
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]