Dockerfiles and Containerization Configurations in codebase-memory-mcp

The codebase-memory-mcp repository contains two Dockerfiles and one docker-compose manifest that support CI testing and Glama MCP sandbox integration.

The codebase-memory-mcp repository provides optional Dockerfiles and containerization configurations to ensure reproducible testing environments and sandboxed execution workflows. While the tool operates natively without containerization, these assets mirror the GitHub Actions CI setup and enable Glama AI score-badge validation.

Test Infrastructure Dockerfile

The test-infrastructure/Dockerfile defines an image that replicates the Ubuntu CI environment using Ubuntu 24.04 as the base. According to the repository source code, this container includes GCC, ASan/UBSan sanitizers, SQLite‑3, and Zlib—matching the dependencies required for the project's test suite.

This Dockerfile serves primarily to run the repository’s test suite in a containerized environment that exactly reproduces the GitHub Actions configuration. Developers use this to debug CI failures locally or validate changes against the canonical build environment.

To build the test infrastructure image:

docker build -t cbm-test ./test-infrastructure

To run the test container with the repository source mounted:

docker run --rm -v "$(pwd)":/src cbm-test

Glama Sandbox Dockerfile

Located at pkg/glama/Dockerfile, this configuration builds a lightweight sandbox image specifically for Glama AI’s score-badge checks. The implementation fetches the statically-linked codebase-memory-mcp binary from the latest GitHub release and sets it as the container entrypoint.

This Dockerfile and containerization configuration is not required for normal operation of the tool. It exists solely to support Glama’s MCP (Model Context Protocol) sandbox requirements, allowing the AI platform to execute the binary in an isolated environment during automated scoring.

Build the Glama sandbox image:

docker build -t glama-cbm ./pkg/glama

Launch the sandbox with the help flag to verify the binary:

docker run --rm glama-cbm --help

Docker Compose Configuration

The repository includes a test-infrastructure/docker-compose.yml file that provides a compose definition for launching the test container. Currently, this configuration references only the test-infrastructure image, but the structure allows for easy extension with auxiliary services such as databases or caching layers if future testing requirements demand them.

Start the test environment using Docker Compose:

docker compose -f test-infrastructure/docker-compose.yml up --build

Building and Running Containerized Workflows

When working with these Dockerfiles and containerization configurations, each serves a distinct purpose in the development lifecycle:

  • CI Replication: Use test-infrastructure/Dockerfile to validate changes against the exact Ubuntu 24.04 environment used in GitHub Actions.
  • Glama Integration: Build pkg/glama/Dockerfile only when preparing releases for Glama AI’s sandbox validation.
  • Orchestration: Leverage docker-compose.yml for simplified multi-service testing scenarios.

All three assets are optional; the codebase-memory-mcp binary compiles and executes directly on host systems without containerization requirements.

Summary

  • The repository contains two Dockerfiles (test-infrastructure/Dockerfile and pkg/glama/Dockerfile) and one docker-compose.yml file.
  • The test infrastructure image mirrors the GitHub Actions CI environment with Ubuntu 24.04, GCC, ASan/UBSan, SQLite‑3, and Zlib.
  • The Glama sandbox Dockerfile creates an isolated execution environment specifically for AI platform score-badge validation.
  • Docker assets are optional; the tool runs natively without containerization.

Frequently Asked Questions

Do I need Docker to run codebase-memory-mcp?

No. The codebase-memory-mcp repository runs natively on Linux, macOS, and other supported platforms without Docker. The Dockerfiles and containerization configurations exist solely as optional aids for CI consistency and Glama AI integration, not for core functionality.

What is the difference between the two Dockerfiles?

The test-infrastructure/Dockerfile creates a development and testing environment that mirrors the GitHub Actions CI setup, including all build dependencies and sanitizers. The pkg/glama/Dockerfile produces a minimal runtime image that downloads and executes the pre-compiled binary specifically for Glama AI’s automated scoring sandbox.

How can I reproduce the CI environment locally?

Build and run the test infrastructure container by executing docker build -t cbm-test ./test-infrastructure followed by docker run --rm -v "$(pwd)":/src cbm-test. This mounts your local source code into a container that exactly matches the Ubuntu 24.04 CI environment used in automated testing.

Is Kubernetes or other orchestration supported?

The repository does not include Kubernetes manifests or additional orchestration configurations. Only the test-infrastructure/docker-compose.yml compose file is provided, and it currently supports only single-container test execution.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →