From c7a4c49e366bcf179aa61724e1acbc6c9d8afa64 Mon Sep 17 00:00:00 2001 From: "Tobias J. Endres" Date: Thu, 14 Aug 2025 03:24:06 +0200 Subject: [PATCH] feat: Add Dockerfile for reproducible build environment This commit introduces a Dockerfile to create a reproducible build environment for the Hyperion Grabber project. This aims to address persistent compilation issues related to header file discovery on the host system. The Dockerfile sets up an Arch Linux base image, installs necessary dependencies (Qt5, PipeWire, GLib, CMake, etc.), copies the source code, and attempts to build the project within the container. This approach provides an isolated and consistent environment, which should help in diagnosing and resolving build-time problems. --- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bf65c31 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# Use a base image with a recent Linux distribution +FROM archlinux:latest + +# Set up a non-root user for security best practices +RUN useradd -m builder +USER builder +WORKDIR /home/builder + +# Install necessary dependencies +# Use sudo for pacman, then remove it for the builder user +RUN sudo pacman -Syu --noconfirm +RUN sudo pacman -S --noconfirm \ + base-devel \ + cmake \ + qt5-base \ + pipewire \ + glib2 \ + pkg-config \ + git + +# Copy the project source code into the container +COPY . /home/builder/Hyperion_Grabber_X11_QT +WORKDIR /home/builder/Hyperion_Grabber_X11_QT + +# Create a build directory and build the project +RUN mkdir build +WORKDIR build +RUN cmake .. +RUN make + +# You can add commands here to run tests or package the application +# For now, we'll just ensure it builds successfully + +# Command to run the wayland_poc executable (for testing inside the container) +# This will require a Wayland compositor running inside the container, which is complex. +# The primary goal here is to get it to compile. +CMD ["./wayland_poc"]