# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview This repository contains the build configuration for `dropshell-build-base`, a Docker base image that provides a comprehensive C++ development environment specifically tailored for building applications with the Drogon web framework and multiple database backends. ## Key Commands ### Building the Docker Image ```bash ./build.sh ``` This builds the Docker image and tags it as `gitea.jde.nz/public/dropshell-build-base:latest`. ### Manual Docker Build ```bash docker build -t gitea.jde.nz/public/dropshell-build-base:latest -f Dockerfile.dropshell-build-base . ``` ## Architecture and Design ### Purpose This base image is designed to create statically-linked C++ executables using: - Alpine Linux with musl libc for minimal container size - All libraries built with static linking (`--enable-static --disable-shared`) - Comprehensive database support (PostgreSQL, MySQL/MariaDB, SQLite3) - Modern C++ web framework (Drogon) with async capabilities ### Key Components Built from Source 1. **c-ares** (1.34.5) - Async DNS resolution 2. **OpenSSL** (3.3.0) - Built with musl, configured for static linking 3. **jsoncpp** (1.9.6) - JSON parsing 4. **PostgreSQL libpq** (16.2) - PostgreSQL client library 5. **cURL** (8.7.1) - HTTP client with OpenSSL support 6. **MariaDB Connector/C** (3.4.5) - MySQL/MariaDB client 7. **SQLite3** (3.45.0) - Embedded database 8. **fmt** (10.2.1) - Modern formatting library 9. **spdlog** (1.13.0) - Fast C++ logging library 10. **Drogon** (latest from git) - C++ web framework ### Build Characteristics - All libraries installed in standard `/usr/local/` location - Position Independent Code (`-fPIC`) enabled for static linking - CMake configured to prefer static libraries (`.a` suffix) - Drogon built with PostgreSQL, MySQL, and SQLite3 support enabled ### Library Installation All libraries are installed with: - Headers in `/usr/local/include/` - Static libraries in `/usr/local/lib/` - CMake configs in `/usr/local/lib/cmake/` - pkg-config files in `/usr/local/lib/pkgconfig/` ### Notes for Development - When modifying the Dockerfile, maintain the build order as dependencies are interlinked - The image uses the latest Drogon from git master, not a fixed version - All database libraries are built before Drogon to ensure proper linking - The build uses `make -j$(nproc)` for parallel compilation