# Built for tinyraycaster: build from source using CMake on Ubuntu Jammy
FROM ubuntu:jammy-20260509
# Install build tools and SDL2 dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
cmake \
netpbm \
libsdl2-dev \
bash \
&& rm -rf /var/lib/apt/lists/*
# Ensure /bin/sh is bash to support pipefail usage in smoke tests
RUN ln -sf /bin/bash /bin/sh
# Create and set working directory for the project
WORKDIR /tinyraycaster
# Copy source code into container
COPY . .
# Build the project from source
RUN cmake -S . -B build && cmake --build build
# Default command: run the built binary (may require a display server)
CMD ["bash", "-lc", "./build/tinyraycaster"]