1
- ARG BASE_IMAGE=ubuntu:24.04
1
+ ARG BASE_IMAGE=ros:jazzy-ros-base
2
2
FROM ${BASE_IMAGE} AS base
3
3
4
4
ARG USER_ID=1000
@@ -10,36 +10,19 @@ ENV ROS_DISTRO=jazzy
10
10
11
11
# Install system dependencies, ROS, Python, and development tools in a single step
12
12
RUN apt-get update && apt-get install -y --no-install-recommends \
13
- curl gnupg2 lsb-release locales software-properties-common \
14
- git build-essential clang-format make ninja-build \
15
- python3-pygame libeigen3-dev libglpk-dev libboost-all-dev \
16
- libboost-filesystem-dev libboost-log-dev libglfw3-dev \
17
- x11-apps mesa-utils \
13
+ curl gnupg2 lsb-release software-properties-common \
14
+ locales \
15
+ git \
16
+ x11-apps \
17
+ mesa-utils \
18
+ gettext-base \
18
19
&& rm -rf /var/lib/apt/lists/*
19
20
20
- # Set up locales
21
- RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
22
- ENV LANG en_US.UTF-8 LANGUAGE en_US:en LC_ALL en_US.UTF-8
21
+ COPY dependencies.txt /tmp/dependencies.txt
23
22
24
- # Install Python and pip
25
23
RUN apt-get update && \
26
- apt-get install -y --no-install-recommends \
27
- python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-tk libpython${PYTHON_VERSION}-dev \
28
- python3-pip python3-argcomplete \
29
- && rm -rf /var/lib/apt/lists/*
30
- RUN ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python3
31
- RUN python3 -m pip install --break-system-packages --no-cache-dir --upgrade setuptools cython catkin_pkg colcon-common-extensions
32
-
33
- # Add ROS2 repository and install core packages
34
- RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
35
- echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list
36
- RUN apt-get update && apt-get install -y --no-install-recommends \
37
- ros-${ROS_DISTRO}-desktop ros-${ROS_DISTRO}-ament-cmake \
38
- ros-${ROS_DISTRO}-ament-cmake-clang-format \
39
- ros-${ROS_DISTRO}-joint-state-publisher-gui ros-${ROS_DISTRO}-xacro \
40
- ros-${ROS_DISTRO}-mcap-vendor ros-${ROS_DISTRO}-interactive-markers \
41
- ros-${ROS_DISTRO}-std-msgs ros-${ROS_DISTRO}-pinocchio \
42
- && rm -rf /var/lib/apt/lists/*
24
+ envsubst < /tmp/dependencies.txt | xargs apt-get install -y --no-install-recommends && \
25
+ rm -rf /var/lib/apt/lists/*
43
26
44
27
# Increase Git buffer size
45
28
RUN git config --global http.postBuffer 1048576000
0 commit comments