Bullseye alongside Bookworm (#61)

* revert to bullseye.

* add bookworm.

* add bookworm to variants.

* include xf86-video-dummy because the remote git instance is offline.

* fix configure.
This commit is contained in:
Miroslav Šedivý
2024-01-26 18:47:40 +01:00
committed by GitHub
parent 3dbcc41795
commit 014c8fa586
34 changed files with 54168 additions and 30 deletions

View File

@ -1,7 +1,10 @@
ARG BASE_IMAGE=debian:bullseye-slim
ARG BUILD_IMAGE=golang:1.21-bullseye
#
# Stage 0: Build xorg dependencies.
#
FROM debian:bookworm-slim as xorg-deps
FROM $BASE_IMAGE as xorg-deps
ENV DEBIAN_FRONTEND=noninteractive
@ -15,13 +18,12 @@ WORKDIR /xorg
COPY xorg/ /xorg/
# build xserver-xorg-video-dummy 0.3.8-2 with RandR support.
# build xf86-video-dummy v0.3.8 with RandR support
RUN set -eux; \
cd xf86-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; \
cd xserver-xorg-video-dummy; \
patch -p1 < ../xdummy-randr.patch; \
./autogen.sh; \
cd xf86-video-dummy/v0.3.8; \
patch -p1 < ../01_v0.3.8_xdummy-randr.patch; \
autoreconf -v --install; \
./configure; \
make -j$(nproc); \
make install;
@ -36,7 +38,7 @@ RUN set -eux; \
#
# Stage 1: Build.
#
FROM golang:1.21-bookworm as build
FROM $BUILD_IMAGE as build
WORKDIR /src
#
@ -45,8 +47,12 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev libxcvt-dev \
libx11-dev libxrandr-dev libxtst-dev libgtk-3-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; \
#
# clean up
apt-get clean -y; \
@ -64,7 +70,7 @@ RUN ./build
#
# Stage 2: Runtime.
#
FROM debian:bookworm-slim as runtime
FROM $BASE_IMAGE as runtime
#
# set custom user
@ -79,8 +85,8 @@ RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates supervisor \
pulseaudio xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx7 libxcvt0 \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6 \
#
# needed for profile upload preStop hook
zip curl \
@ -92,6 +98,10 @@ RUN set -eux; \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio; \
# install libxcvt0 (not available in debian:bullseye)
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; \
rm ./libxcvt0_0.1.2-1_amd64.deb; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
@ -133,8 +143,10 @@ COPY --from=xorg-deps /usr/local/lib/xorg/modules/input/neko_drv.so /usr/lib/xor
#
# copy runtime configs
COPY --chown=neko:neko runtime/.Xresources /home/$USERNAME/.Xresources
COPY runtime/dbus /usr/bin/dbus
COPY runtime/default.pa /etc/pulse/default.pa
COPY runtime/supervisord.conf /etc/neko/supervisord.conf
COPY runtime/supervisord.dbus.conf /etc/neko/supervisord.dbus.conf
COPY runtime/xorg.conf /etc/neko/xorg.conf
#