-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
72 lines (61 loc) · 1.93 KB
/
Dockerfile
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM ubuntu:22.04
WORKDIR /home
ENV HOME /home
ENV DEVIAN_FRONTEND noninteractive
ENV TZ Asia/Tokyo
ARG ROS_DISTRO=humble
ARG ROS_PKG=desktop
ENV ROS_ROOT=/opt/ros/${ROS_DISTRO}
ENV ROS_PYTHON_VERSION=3
# Install tzdata with environment variables to bypass interactive prompt
RUN apt update && \
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt install -y tzdata
# install basic packages
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
x11-apps \
mesa-utils \
curl \
lsb-release \
less \
tmux \
command-not-found \
git \
xsel \
vim \
plocate \
tree \
wget \
gnupg \
build-essential \
python3-dev \
python3-pip \
&& \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
RUN sudo curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
ros-humble-desktop \
&& \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
# install ros2 packages
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-${ROS_PKG} \
ros-${ROS_DISTRO}-gazebo-ros-pkgs \
ros-${ROS_DISTRO}-joint-state-publisher* \
python3-colcon-common-extensions \
ros-${ROS_DISTRO}-can-msgs \
python3-colcon-mixin \
python3-rosdep \
python3-vcstool && \
sudo rosdep init && \
rosdep update --rosdistro ${ROS_DISTRO} && \
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
COPY config/.bashrc /home/.bashrc
COPY config/.vimrc /home/.vimrc
COPY config/.tmux.conf /home/.tmux.conf
CMD ["bash"]