Skip to content

Commit cb51785

Browse files
committed
Update robot docker image
1 parent cd99dbc commit cb51785

File tree

2 files changed

+51
-17
lines changed

2 files changed

+51
-17
lines changed

robot/docker/Dockerfile.robot

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,63 @@
22
ARG BASE_IMAGE
33
FROM ${BASE_IMAGE}
44

5-
# ========================
6-
# install ros2 humble https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html
7-
RUN apt update && apt install -y locales
8-
RUN locale-gen en_US en_US.UTF-8
9-
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
10-
RUN export LANG=en_US.UTF-8
11-
12-
RUN apt install -y software-properties-common
13-
RUN add-apt-repository universe
14-
15-
RUN apt update && apt install curl -y
16-
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
17-
18-
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
5+
# from https://github.com/athackst/dockerfiles/blob/main/ros2/humble.Dockerfile
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
8+
# Install language
9+
RUN apt-get update && apt-get install -y \
10+
locales \
11+
&& locale-gen en_US.UTF-8 \
12+
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
13+
&& rm -rf /var/lib/apt/lists/*
14+
ENV LANG=en_US.UTF-8
15+
16+
# Install timezone
17+
RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime \
18+
&& export DEBIAN_FRONTEND=noninteractive \
19+
&& apt-get update \
20+
&& apt-get install -y tzdata \
21+
&& dpkg-reconfigure --frontend noninteractive tzdata \
22+
&& rm -rf /var/lib/apt/lists/*
23+
24+
RUN apt-get update && apt-get -y upgrade \
25+
&& rm -rf /var/lib/apt/lists/*
1926

20-
RUN apt update && apt install -y ros-humble-desktop
27+
# Install common programs
28+
RUN apt-get update && apt-get install -y --no-install-recommends \
29+
curl \
30+
gnupg2 \
31+
lsb-release \
32+
sudo \
33+
software-properties-common \
34+
wget \
35+
&& rm -rf /var/lib/apt/lists/*
2136

37+
# Install ROS2
38+
RUN sudo add-apt-repository universe \
39+
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
40+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null \
41+
&& apt-get update && apt-get install -y --no-install-recommends \
42+
ros-humble-desktop \
43+
python3-argcomplete \
44+
&& rm -rf /var/lib/apt/lists/*
45+
46+
ENV ROS_DISTRO=humble
47+
ENV AMENT_PREFIX_PATH=/opt/ros/humble
48+
ENV COLCON_PREFIX_PATH=/opt/ros/humble
49+
ENV LD_LIBRARY_PATH=/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib
50+
ENV PATH=/opt/ros/humble/bin:$PATH
51+
ENV PYTHONPATH=/opt/ros/humble/local/lib/python3.10/dist-packages:/opt/ros/humble/lib/python3.10/site-packages
52+
ENV ROS_PYTHON_VERSION=3
53+
ENV ROS_VERSION=2
54+
ENV ROS_AUTOMATIC_DISCOVERY_RANGE=SUBNET
55+
ENV DEBIAN_FRONTEND=
2256
# ========================
2357

2458
WORKDIR /root/ros_ws
2559

2660
# Install dev tools
27-
RUN apt install -y \
61+
RUN apt update && apt install -y \
2862
vim nano wget curl tree \
2963
cmake build-essential \
3064
less htop jq \

robot/docker/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
services:
33
# ===================================================================================================================
44
# for developing locally on a single machine
5-
robot_desktop:
5+
robot_sim:
66
profiles:
77
- ""
88
- sitl

0 commit comments

Comments
 (0)