- Create layered container architecture: Base, Light, Full, Computational - Implement non-root user management with UID/GID mapping - Add Markwhen timeline tool to documentation stack - Create wrapper scripts for environment variable handling - Update documentation across all containers - Establish naming convention using RCEO-AIOS-Public-Tools- prefix - Add organizational rule to keep repository root clean - Remove old unorganized container files
106 lines
3.3 KiB
Markdown
106 lines
3.3 KiB
Markdown
# RCEO-AIOS-Public-Tools-DocMaker-Base Container
|
|
|
|
This container is part of the AIOS-Public project and provides a base documentation generation environment.
|
|
|
|
## Overview
|
|
|
|
The RCEO-AIOS-Public-Tools-DocMaker-Base container is designed for lightweight documentation generation tasks. It includes a range of tools for creating, converting, and processing documentation in various formats without heavy dependencies like full LaTeX.
|
|
|
|
## Tools Included
|
|
|
|
### Core Tools
|
|
- **Base OS**: Debian Bookworm slim
|
|
- **Shell**: Bash
|
|
- **Programming Languages**:
|
|
- Python 3
|
|
- Node.js
|
|
- Rust (with Cargo)
|
|
|
|
### Documentation Generation
|
|
- **Pandoc**: Universal document converter
|
|
- **mdBook**: Create books from Markdown files
|
|
- **mdbook-pdf**: PDF renderer for mdBook
|
|
- **Typst**: Modern typesetting system
|
|
- **Marp CLI**: Create presentations from Markdown
|
|
- **Markwhen**: Interactive text-to-timeline tool
|
|
|
|
### LaTeX
|
|
- **TeX Live**: Lightweight LaTeX packages for basic document typesetting
|
|
|
|
### Spell and Grammar Checking
|
|
- **Hunspell**: Spell checker (with en-US dictionary)
|
|
- **Aspell**: Spell checker (with en dictionary)
|
|
- **Vale**: Syntax-aware linter for prose
|
|
|
|
### Text Analysis
|
|
- **mdstat**: Text statistics including reading time estimation
|
|
|
|
## Usage
|
|
|
|
### Building the Base Container
|
|
```bash
|
|
# From this directory
|
|
cd /home/localuser/AIWorkspace/AIOS-Public/Docker/RCEO-AIOS-Public-Tools-DocMaker-Base
|
|
|
|
# Use the wrapper script to automatically detect and set user IDs
|
|
./docker-compose-wrapper.sh build
|
|
|
|
# Or run commands in the base container with automatic user mapping
|
|
./docker-compose-wrapper.sh run docmaker-base [command]
|
|
|
|
# Example: Convert a Markdown file to PDF using pandoc
|
|
./docker-compose-wrapper.sh run docmaker-base pandoc input.md -o output.pdf
|
|
|
|
# Example: Create a timeline with Markwhen
|
|
./docker-compose-wrapper.sh run docmaker-base markwhen input.mw --output output.html
|
|
```
|
|
|
|
### Using with docker-compose directly
|
|
```bash
|
|
# Set environment variables and run docker-compose directly
|
|
LOCAL_USER_ID=$(id -u) LOCAL_GROUP_ID=$(id -g) docker-compose up --build
|
|
|
|
# Or export variables first
|
|
export LOCAL_USER_ID=$(id -u)
|
|
export LOCAL_GROUP_ID=$(id -g)
|
|
docker-compose up
|
|
```
|
|
|
|
### Using the wrapper script
|
|
```bash
|
|
# Build and start the base documentation container with automatic user mapping
|
|
./docker-compose-wrapper.sh up --build
|
|
|
|
# Start without rebuilding
|
|
./docker-compose-wrapper.sh up
|
|
|
|
# View container status
|
|
./docker-compose-wrapper.sh ps
|
|
|
|
# Stop containers
|
|
./docker-compose-wrapper.sh down
|
|
```
|
|
|
|
## User ID Mapping (For File Permissions)
|
|
|
|
The container automatically detects and uses the host user's UID and GID to ensure proper file permissions. This means:
|
|
|
|
- Files created inside the container will have the correct ownership on the host
|
|
- No more root-owned files after container operations
|
|
- Works across different environments (development, CI/CD, cloud)
|
|
|
|
The container detects the user ID from the mounted workspace volume. If needed, you can override the default values by setting environment variables:
|
|
|
|
```bash
|
|
# Set specific user ID and group ID before running docker-compose
|
|
export LOCAL_USER_ID=1000
|
|
export LOCAL_GROUP_ID=1000
|
|
docker-compose up
|
|
```
|
|
|
|
Or run with inline environment variables:
|
|
```bash
|
|
LOCAL_USER_ID=1000 LOCAL_GROUP_ID=1000 docker-compose up
|
|
```
|
|
|
|
The container runs as a non-root user named `ReachableCEO-Tools` with the detected host user's UID/GID. |