-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbase.dockerfile
More file actions
58 lines (47 loc) · 1.78 KB
/
base.dockerfile
File metadata and controls
58 lines (47 loc) · 1.78 KB
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
ARG BASE_IMAGE=ros:humble
ARG ROS_DISTRO=humble
FROM ${BASE_IMAGE} AS base
ARG BASE_IMAGE
ARG ROS_DISTRO
ENV BASE_IMAGE=${BASE_IMAGE}
ENV ROS_DISTRO=${ROS_DISTRO}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
gnupg \
cmake \
git \
curl \
wget \
unzip \
nano \
ros-${ROS_DISTRO}-ros-base \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
python3-colcon-common-extensions \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update --rosdistro ${ROS_DISTRO}
# Setup VirtualGL
RUN wget -q -O- https://packagecloud.io/dcommander/virtualgl/gpgkey | gpg --dearmor >/etc/apt/trusted.gpg.d/VirtualGL.gpg \
&& echo "deb [signed-by=/etc/apt/trusted.gpg.d/VirtualGL.gpg] https://packagecloud.io/dcommander/virtualgl/any/ any main" >>/etc/apt/sources.list.d/virtualgl.list \
&& apt-get update && apt-get install -y virtualgl libgl1 && rm -rf /var/lib/apt/lists/*
# Fix GLVND NVIDIA EGL registration
COPY nvidia-egl-vendor.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json
# Configure bash profile
RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \
echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \
echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ENV TVNC_VGL=1
ENV VGL_ISACTIVE=1
ENV VGL_FPS=25
ENV VGL_COMPRESS=0
ENV VGL_DISPLAY=egl
ENV VGL_WM=1
ENV VGL_PROBEGLX=0
ENV LD_PRELOAD=libdlfaker.so:libvglfaker.so
ENV SHELL=/bin/bash
CMD ["bash", "-l"]