-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy pathDockerfile.ros1
More file actions
54 lines (43 loc) · 1.94 KB
/
Dockerfile.ros1
File metadata and controls
54 lines (43 loc) · 1.94 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
ARG ROS_DISTRIBUTION=noetic
FROM ros:$ROS_DISTRIBUTION-ros-base
# Update apt keys for EOL distros. For current distros this is already in the base docker image.
# https://github.com/osrf/docker_images/commit/eb5634cf92ba079897e44fb7541d3b78aa6cf717
# https://discourse.ros.org/t/ros-signing-key-migration-guide/43937
ADD --checksum=sha256:c0cc26f70da91a4fa5a613278a53885184e91df45214ab34e1bae0f3a44f83ea https://github.com/ros-infrastructure/ros-apt-source/releases/download/1.1.0/ros-apt-source_1.1.0.focal_all.deb /tmp/ros-apt-source.deb
RUN rm -f /etc/apt/sources.list.d/ros1-latest.list \
&& apt-get install /tmp/ros-apt-source.deb \
&& rm -f /tmp/ros-apt-source.deb \
&& rm -rf /var/lib/apt/lists/*
# Install clang and set as default compiler.
RUN apt-get update && apt-get install -y --no-install-recommends \
clang \
&& rm -rf /var/lib/apt/lists/*
ENV CC=clang
ENV CXX=clang++
# Set environment and working directory
ENV ROS_WS /ros1_ws
WORKDIR $ROS_WS
# Add package.xml so we can install package dependencies.
COPY package.xml src/ros-foxglove-bridge/
# Install rosdep dependencies
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
apt-get update && rosdep update --include-eol-distros && rosdep install -y \
--from-paths \
src \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*
# Add common files and ROS 1 source code
COPY CMakeLists.txt src/ros-foxglove-bridge/CMakeLists.txt
COPY foxglove_bridge_base src/ros-foxglove-bridge/foxglove_bridge_base
COPY nodelets.xml src/ros-foxglove-bridge/nodelets.xml
COPY ros1_foxglove_bridge src/ros-foxglove-bridge/ros1_foxglove_bridge
ARG USE_ASIO_STANDALONE=ON
# Build the Catkin workspace
RUN . /opt/ros/$ROS_DISTRO/setup.sh \
&& catkin_make -DUSE_ASIO_STANDALONE=$USE_ASIO_STANDALONE
# source workspace from entrypoint
RUN sed --in-place \
's|^source .*|source "$ROS_WS/devel/setup.bash"|' \
/ros_entrypoint.sh
# Run foxglove_bridge
CMD ["rosrun", "foxglove_bridge", "foxglove_bridge"]