diff --git a/Dockerfile b/Dockerfile index 0fdb2a7..1cce1e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,9 +47,9 @@ rm -rf /var/lib/apt/lists/* RUN pip install --upgrade pip setuptools -RUN packages='libsdl2-2.0 xserver-xorg libvulkan1' \ - && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages --no-install-recommends \ - && VULKAN_API_VERSION=`dpkg -s libvulkan1 | grep -oP 'Version: [0-9|\.]+' | grep -oP '[0-9|\.]+'` && \ +RUN packages='libsdl2-2.0 xserver-xorg libvulkan1' && \ + apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y $packages --no-install-recommends && \ + VULKAN_API_VERSION=`dpkg -s libvulkan1 | grep -oP 'Version: [0-9|\.]+' | grep -oP '[0-9|\.]+'` && \ mkdir -p /etc/vulkan/icd.d/ && \ echo \ "{\ @@ -58,8 +58,8 @@ \"library_path\": \"libGLX_nvidia.so.0\",\ \"api_version\" : \"${VULKAN_API_VERSION}\"\ }\ - }" > /etc/vulkan/icd.d/nvidia_icd.json \ - && rm -rf /var/lib/apt/lists/* + }" > /etc/vulkan/icd.d/nvidia_icd.json && \ + rm -rf /var/lib/apt/lists/* # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Failed to execute child process dbus-launch (No such file or directory) # fix by setting LANG https://askubuntu.com/questions/608330/problem-with-gnome-terminal-on-gnome-3-12-2 @@ -94,7 +94,7 @@ pkg-config \ libelf-dev \ gnupg patch xinit && \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* # libc6:i386 \ # (1-2) Install xorg server and xinit BEFORE INSTALLING NVIDIA DRIVER. @@ -128,14 +128,14 @@ # # Note: x11vnc in ubuntu18.04 is useless beacuse of stack smashing bug. See below to manual compilation. RUN apt-get update && apt-get install -y --no-install-recommends \ - mesa-utils lxterminal gnome-tweak-tool \ - x11-apps && \ + mesa-utils lxterminal gnome-tweak-tool \ + x11-apps && \ rm -rf /var/lib/apt/lists/* # solution for the `stack smashing detected` issue # https://github.com/LibVNC/x11vnc/issues/61 RUN apt-get update && apt-get install -y --no-install-recommends \ - automake autoconf libssl-dev xorg-dev libvncserver-dev xdg-user-dirs xdg-utils && \ + automake autoconf libssl-dev xorg-dev libvncserver-dev xdg-user-dirs xdg-utils && \ rm -rf /var/lib/apt/lists/* && \ git clone -b 0.9.16 https://github.com/LibVNC/x11vnc.git && \ cd x11vnc && \ @@ -146,25 +146,22 @@ # (2-2) Optional vulkan support # vulkan-utils includes vulkan-smoketest, benchmark software of vulkan API RUN apt-get update && apt-get install -y --no-install-recommends \ - vulkan-utils \ - firefox openbox menu \ - alsa pulseaudio libgtk2.0-0 && \ + vulkan-utils firefox openbox menu alsa pulseaudio libgtk2.0-0 && \ rm -rf /var/lib/apt/lists/* # novnc # download websockify as well RUN wget https://github.com/novnc/noVNC/archive/v1.3.0.zip && \ - unzip -q v1.3.0.zip && \ - rm -rf v1.3.0.zip && \ - git clone -b v0.10.0 https://github.com/novnc/websockify /noVNC-1.3.0/utils/websockify + unzip -q v1.3.0.zip && \ + rm -rf v1.3.0.zip && \ + git clone -b v0.10.0 https://github.com/novnc/websockify /noVNC-1.3.0/utils/websockify # Xorg segfault error # dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory) # related? https://github.com/Microsoft/WSL/issues/2016 RUN apt-get update && apt-get install -y --no-install-recommends \ - dbus-x11 \ - libdbus-c++-1-0v5 && \ + dbus-x11 libdbus-c++-1-0v5 && \ rm -rf /var/lib/apt/lists/* RUN echo "alias m='cd /home/$USERNAME ; su $USERNAME'" >> /home/$USERNAME/.bashrc @@ -173,23 +170,22 @@ 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-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 RUN apt-get update && apt-get install -y --no-install-recommends \ - ros-melodic-desktop-full \ - python-rosdep \ - python-rosinstall \ - python-rosinstall-generator \ - python-wstool \ - && \ + ros-melodic-desktop-full \ + python-rosdep \ + python-rosinstall \ + python-rosinstall-generator \ + python-wstool && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # addtional ROS package RUN apt-get update && apt-get install -y --no-install-recommends \ - ros-melodic-derived-object-msgs \ - ros-melodic-ackermann-msgs \ - ros-melodic-ainstein-radar-msgs \ - python3-numpy \ - libomp-dev \ - libomp5 && \ + ros-melodic-derived-object-msgs \ + ros-melodic-ackermann-msgs \ + ros-melodic-ainstein-radar-msgs \ + python3-numpy \ + libomp-dev \ + libomp5 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*