FROM debian:bullseye-slim

RUN apt-get update && apt-get install -y \
    sway \
    xwayland \
    dbus-x11 \
    libwayland-client0 \
    libwayland-server0 \
    libwayland-egl1 \
    mesa-vulkan-drivers \
    libvulkan1 \
    fonts-liberation \
    x11-xserver-utils \
    && rm -rf /var/lib/apt/lists/*

COPY sway.conf /etc/sway/config
COPY start.sh /start.sh
RUN chmod +x /start.sh

# Need to run as root to access DRM devices on many kiosk setups
USER root

CMD ["/start.sh"]
