Update build environment to Alpine, enable GUI support, and refine developer guide - Migrated Dockerfile base image from Ubuntu 22.04 to Alpine 3.19 for a smaller and faster container. - Added dependencies for GUI support (SDL2, OpenGL/Mesa, Freetype, etc.) and updated CMake options. - Enhanced `DEVELOPER_GUIDE.md` with new instructions for GUI builds, updated dependencies, and simplified custom build workflows. - Addressed Alpine-specific ncurses library path issues in CMake configuration.
24 lines
807 B
Docker
24 lines
807 B
Docker
# Minimal Dockerfile for building and testing kte on Linux
|
|
# This container provides a build environment with all dependencies.
|
|
# Mount the source tree at /kte when running the container.
|
|
FROM alpine:3.19
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache \
|
|
g++ \
|
|
cmake \
|
|
make \
|
|
ncurses-dev \
|
|
sdl2-dev \
|
|
mesa-dev \
|
|
freetype-dev \
|
|
libx11-dev \
|
|
libxext-dev
|
|
|
|
# Set working directory where source will be mounted
|
|
WORKDIR /kte
|
|
|
|
# Default command: build and run tests
|
|
# Add DirectFB include path for SDL2 compatibility on Alpine
|
|
CMD ["sh", "-c", "cmake -B build -DBUILD_GUI=ON -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS='-I/usr/include/directfb' && cmake --build build --target kte && cmake --build build --target kge && cmake --build build --target kte_tests && ./build/kte_tests"]
|