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.
38 lines
1.0 KiB
Docker
38 lines
1.0 KiB
Docker
# 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"]
|