Files
lightweight-cobot/docker/jazzy/ros-core/Dockerfile
T

45 lines
1.3 KiB
Docker

FROM ubuntu:noble
ARG TIMEZONE=Etc/UTC
# Timezone
RUN echo "${TIMEZONE}" > /etc/timezone && \
ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
apt-get update && \
apt-get install -q -y --no-install-recommends tzdata && \
rm -rf /var/lib/apt/lists/*
# Базовые утилиты
RUN apt-get update && apt-get install -q -y --no-install-recommends \
curl \
dirmngr \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# Ключ и стабильный репозиторий ROS2
RUN set -eux; \
key='C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
mkdir -p /usr/share/keyrings; \
gpg --batch --export "$key" > /usr/share/keyrings/ros2-archive-keyring.gpg; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"
RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-archive-keyring.gpg ] \
http://packages.ros.org/ros2/ubuntu noble main" \
> /etc/apt/sources.list.d/ros2.list
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV ROS_DISTRO=jazzy
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-jazzy-ros-core \
&& rm -rf /var/lib/apt/lists/*
COPY ./ros_entrypoint.sh /
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]