-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
41 lines (34 loc) · 1.52 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
FROM ros:humble-ros-base
# create workspace
RUN mkdir -p /ros_ws/src
WORKDIR /ros_ws/
# clone projects
RUN cd src && git clone https://github.com/chenjunnn/rm_auto_aim --depth=1 && \
git clone https://github.com/chenjunnn/ros2_mindvision_camera --depth=1 && \
git clone https://github.com/chenjunnn/ros2_hik_camera --depth=1 && \
git clone https://github.com/chenjunnn/rm_gimbal_description --depth=1 && \
git clone https://github.com/chenjunnn/rm_serial_driver --depth=1 && \
git clone https://github.com/chenjunnn/rm_vision --depth=1
# install dependencies and some tools
RUN apt-get update && rosdep install --from-paths src --ignore-src -r -y && \
apt-get install ros-humble-foxglove-bridge wget htop vim -y && \
rm -rf /var/lib/apt/lists/*
# setup zsh
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.2/zsh-in-docker.sh)" -- \
-t jispwoso -p git \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-syntax-highlighting && \
chsh -s /bin/zsh && \
rm -rf /var/lib/apt/lists/*
# build
RUN . /opt/ros/humble/setup.sh && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
# setup .zshrc
RUN echo 'export TERM=xterm-256color\n\
source /ros_ws/install/setup.zsh\n\
eval "$(register-python-argcomplete3 ros2)"\n\
eval "$(register-python-argcomplete3 colcon)"\n'\
>> /root/.zshrc
# source entrypoint setup
RUN sed --in-place --expression \
'$isource "/ros_ws/install/setup.bash"' \
/ros_entrypoint.sh