add webwords Docker image reference guide for workers
This commit is contained in:
parent
1efa96a837
commit
332a64825d
1 changed files with 32 additions and 0 deletions
32
CLAUDE.md
32
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue