diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 0b844def..38dd492b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,33 @@ +# +# Stage 0: Build xserver-xorg-video-dummy 0.3.8-2 with RandR support. +# +FROM debian:bullseye-slim as xserver-xorg-video-dummy + +WORKDIR /usr/local/src + +ENV DEBIAN_FRONTEND=noninteractive +RUN set -eux; \ + cp /etc/apt/sources.list /etc/apt/sources.list~; \ + sed -Ei 's/^deb /deb-src /' /etc/apt/sources.list; \ + cat /etc/apt/sources.list~ >> /etc/apt/sources.list; \ + apt-get update; \ + apt-get install -y dpkg-dev git; \ + apt-get build-dep -y xserver-xorg-video-dummy; \ + git clone --depth 1 --branch xserver-xorg-video-dummy-1_0.3.8-2 https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-dummy; \ + # + # clean up + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +COPY runtime/xdummy-randr.patch /tmp/xdummy-randr.patch + +RUN set -eux; \ + cd xserver-xorg-video-dummy; \ + patch -p1 < /tmp/xdummy-randr.patch; \ + bash ./autogen.sh; \ + make; \ + make install; + # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.166.0/containers/go/.devcontainer/base.Dockerfile # [Choice] Go version: 1, 1.16, 1.15 @@ -13,7 +43,11 @@ RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/l RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev \ - libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev + libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev; \ + # install libxcvt-dev (not available in debian:bullseye) + wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt-dev_0.1.2-1_amd64.deb; \ + wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt0_0.1.2-1_amd64.deb; \ + apt-get install --no-install-recommends ./libxcvt0_0.1.2-1_amd64.deb ./libxcvt-dev_0.1.2-1_amd64.deb; # runtime dependencies RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ @@ -25,13 +59,14 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # needed for profile upload preStop hook zip curl \ # - # file chooser handler, clipboard - xdotool xclip \ + # file chooser handler, clipboard, drop + xdotool xclip libgtk-3-0 \ # # gst gstreamer1.0-plugins-base gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ gstreamer1.0-pulseaudio; + # libxcvt already installed # dev runtime dependencies RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ @@ -55,10 +90,6 @@ RUN set -eux; \ echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME; \ chmod 0440 /etc/sudoers.d/$USERNAME; \ # - # setup pulseaudio - mkdir -p /home/$USERNAME/.config/pulse/; \ - echo "default-server=unix:/tmp/pulseaudio.socket" > /home/$USERNAME/.config/pulse/client.conf; \ - # # workaround for an X11 problem: http://blog.tigerteufel.de/?p=476 mkdir /tmp/.X11-unix; \ chmod 1777 /tmp/.X11-unix; \ @@ -81,6 +112,9 @@ RUN set -eux; \ # Indian fonts fonts-indic; +# replace version +COPY --from=xserver-xorg-video-dummy /usr/local/lib/xorg/modules/drivers/dummy_drv.so /usr/lib/xorg/modules/drivers/dummy_drv.so + # copy runtime files COPY runtime/dbus /usr/bin/dbus COPY runtime/default.pa /etc/pulse/default.pa @@ -103,5 +137,6 @@ RUN chmod +x /usr/bin/dbus;\ # set default envs ENV USER=$USERNAME ENV DISPLAY=:99.0 +ENV PULSE_SERVER=unix:/tmp/pulseaudio.socket ENV NEKO_SERVER_BIND=:3000 ENV NEKO_WEBRTC_EPR=3001-3004 diff --git a/Dockerfile b/Dockerfile index f1ea73a4..1c8db9a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN set -eux; \ sed -Ei 's/^deb /deb-src /' /etc/apt/sources.list; \ cat /etc/apt/sources.list~ >> /etc/apt/sources.list; \ apt-get update; \ - apt-get install -y dpkg-dev git; \ + apt-get install -y dpkg-dev git; \ apt-get build-dep -y xserver-xorg-video-dummy; \ git clone --depth 1 --branch xserver-xorg-video-dummy-1_0.3.8-2 https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-dummy; \ # @@ -24,8 +24,8 @@ COPY runtime/xdummy-randr.patch /tmp/xdummy-randr.patch RUN set -eux; \ cd xserver-xorg-video-dummy; \ patch -p1 < /tmp/xdummy-randr.patch; \ - bash ./autogen.sh; \ - make; \ + bash ./autogen.sh; \ + make; \ make install; #