-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
109 lines (92 loc) · 3.72 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
FROM ubuntu:20.04
# set time zone
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
# if compiling amd64, you can remove the following comments to use the CN sources
# set up CN sources
# RUN rm -rf /etc/apt/sources.list
# RUN rm -rf /etc/apt/sources.list.d/*
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal main restricted >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-updates main restricted >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal universe >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-updates universe >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal multiverse >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-updates multiverse >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-security main restricted >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-security universe >> /etc/apt/sources.list
# RUN echo deb [arch=amd64,i386] http://cn.archive.ubuntu.com/ubuntu focal-security multiverse >> /etc/apt/sources.list
RUN apt-get update
# unminimize ubuntu
RUN yes | unminimize
# config CN environment
RUN apt install language-pack-zh-hans -y
RUN echo LANG="zh_CN.UTF-8" >> /etc/environment
RUN echo LANGUAGE="zh_CN:zh:en_US:en" >> /etc/environment
RUN echo LANG="zh_CN.UTF-8" >> /etc/profile
RUN echo LANGUAGE="zh_CN:zh:en_US:en" >> /etc/profile
RUN echo LANG="zh_CN.UTF-8" >> ~/.bashrc
RUN echo LANGUAGE="zh_CN:zh:en_US:en" >> ~/.bashrc
RUN locale-gen
RUN /bin/bash -c "source ~/.bashrc"
# install xfce4
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y xfce4 xfce4-terminal
RUN apt install dbus-x11 -y
RUN apt install fonts-wqy-microhei -y
RUN apt install -y \
gnome-user-docs-zh-hans \
language-pack-gnome-zh-hans \
fcitx \
fcitx-pinyin \
fcitx-table-wubi \
vim
# install ROS
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-get install curl -y
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt-get update
RUN apt install ros-noetic-desktop-full -y
RUN echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
RUN /bin/bash -c "source ~/.bashrc"
# install SAD dependence
RUN apt-get install -y \
ros-noetic-pcl-ros \
ros-noetic-velodyne-msgs \
libopencv-dev \
libgoogle-glog-dev \
libeigen3-dev \
libsuitesparse-dev \
libpcl-dev\
libyaml-cpp-dev \
libbtbb-dev \
libgmock-dev \
pcl-tools \
libspdlog-dev \
libqglviewer-dev-qt5
# install pangolin
RUN apt-get install git -y
WORKDIR /root/software
RUN git clone https://github.com/stevenlovegrove/Pangolin.git
RUN cd Pangolin && \
mkdir build && \
cd build && \
cmake .. && \
make -j8 && \
make install && \
ldconfig
# set up vnc
RUN apt-get install tigervnc-standalone-server x11vnc -y
WORKDIR /root/.vnc
COPY ./docker/xstartup ./
RUN chmod u+x ~/.vnc/xstartup
# set up noVNC
WORKDIR /usr/lib
RUN git clone https://github.com/novnc/noVNC.git -o noVNC
WORKDIR /usr/lib/noVNC/utils
RUN git clone https://github.com/novnc/websockify.git -o websockify
WORKDIR /
COPY ./docker/startup.sh ./
RUN chmod u+x startup.sh
ENTRYPOINT ["./startup.sh"]
# ENTRYPOINT ["tail","-f","/dev/null"]