2.5 KiB
2.5 KiB
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
./build.sh
This builds the Docker image and tags it as gitea.jde.nz/public/dropshell-build-base:latest
.
Manual Docker Build
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
- c-ares (1.34.5) - Async DNS resolution
- OpenSSL (3.3.0) - Built with musl, configured for static linking
- jsoncpp (1.9.6) - JSON parsing
- PostgreSQL libpq (16.2) - PostgreSQL client library
- cURL (8.7.1) - HTTP client with OpenSSL support
- MariaDB Connector/C (3.4.5) - MySQL/MariaDB client
- SQLite3 (3.45.0) - Embedded database
- fmt (10.2.1) - Modern formatting library
- spdlog (1.13.0) - Fast C++ logging library
- Drogon (latest from git) - C++ web framework
- nlohmann/json (3.11.3) - Modern JSON library for C++
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