-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.ros
More file actions
54 lines (38 loc) · 1.44 KB
/
Dockerfile.ros
File metadata and controls
54 lines (38 loc) · 1.44 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_DISTRO=humble
ARG TAG=core
FROM ubuntu:20.04 AS husarnet-dds-getter
ARG TARGETARCH
ARG HUSARNET_DDS_RELEASE="v1.3.6"
ENV HUSARNET_DDS_DEBUG=FALSE
RUN apt update && apt install -y \
curl
RUN curl -L https://github.com/husarnet/husarnet-dds/releases/download/${HUSARNET_DDS_RELEASE}/husarnet-dds-linux-${TARGETARCH} -o /usr/bin/husarnet-dds && \
chmod +x /usr/bin/husarnet-dds
## =========================== Final Stage ===============================
FROM ros:$ROS_DISTRO-ros-$TAG AS final
SHELL ["/bin/bash", "-c"]
COPY --from=husarnet-dds-getter /usr/bin/husarnet-dds /usr/bin/husarnet-dds
COPY ros_entrypoint.sh shm-only.xml /
RUN apt-get update && apt-get install -y \
gosu \
ros-$ROS_DISTRO-rmw-fastrtps-cpp \
ros-$ROS_DISTRO-rmw-cyclonedds-cpp \
ros-$ROS_DISTRO-rmw-zenoh-cpp \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
echo "source \"/opt/ros/$ROS_DISTRO/setup.bash\"" >> /etc/bash.bashrc && \
echo "test -f \"/ros2_ws/install/setup.bash\" && source \"/ros2_ws/install/setup.bash\"" >> /etc/bash.bashrc
ENV USER=root
# ## =========================== Optimizing size ===============================
# FROM scratch
# ARG ROS_DISTRO
# COPY --from=final / /
# ENV LANG=C.UTF-8
# ENV LC_ALL=C.UTF-8
# ENV ROS_DISTRO=$ROS_DISTRO
# ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp
# ENV USER=root
# ENTRYPOINT [ "/ros_entrypoint.sh" ]
# CMD [ "bash" ]
# SHELL ["/bin/bash", "-c"]