From 332a64825d2e1ca05df0616bb851cbf671340592 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 12 Oct 2025 14:43:03 -0400 Subject: [PATCH] add webwords Docker image reference guide for workers --- CLAUDE.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index eb2723b..898147f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -119,6 +119,38 @@ - Dockerfile for building/testing in isolation - index.html explaining the code and usage +## Using WebWords as Reference for Docker Images +**IMPORTANT: The webwords project has already done the heavy lifting!** + +The `webwords/` directory (gitignored, clone from https://github.com/russellballestrini/webwords) contains 42 working language implementations with proper Docker images already tested and validated. + +### How to Use WebWords as Reference: +1. **Check webwords Dockerfile**: Look at `webwords/{language}/Dockerfile` for the proper base image +2. **Copy proven image choices**: Use the same base image that webwords already validated +3. **Adapt the build process**: Modify the Dockerfile to install OpenAI client libraries instead of webwords dependencies +4. **Keep the structure**: Multi-stage builds, alpine bases, proper ENTRYPOINT/CMD patterns + +### Example Docker Image Mappings (from webwords): +- **Python**: `alpine:latest` with `python3 py3-pip` +- **Go**: Multi-stage with `golang:1.19-alpine` → `alpine:latest` +- **Rust**: Multi-stage with `rust:1.82` → `debian:bookworm-slim` +- **Node.js/JavaScript**: `node:18-alpine` +- **Ruby**: `ruby:3.1-slim` +- **C/C++**: `alpine:latest` with gcc +- **Java**: `openjdk:17-jdk-slim` +- **C#**: `mcr.microsoft.com/dotnet/sdk` → `mcr.microsoft.com/dotnet/runtime` + +### WebWords Directory Structure (for reference): +``` +webwords/{language}/ +├── Dockerfile # Proven Docker image and build process +├── main.{ext} # Source code (adapt for our API calls) +├── requirements.txt # Dependencies (replace with openai client) +└── README.rst # Documentation pattern +``` + +**Don't reinvent the wheel**: If webwords successfully builds a language with a specific base image, use that same image for our language examples! + ## Documentation Standards ### index.html Structure Each language's index.html should: