2025-11-27 13:10:00 +00:00
|
|
|
# ht-docker-tools
|
|
|
|
|
|
|
|
|
|
Docker images for various tools (MongoDB, MinIO, ClickHouse, Caddy, Redis) enhanced with Deno runtime support.
|
|
|
|
|
|
|
|
|
|
## Available Images
|
|
|
|
|
|
|
|
|
|
### Official Base Images
|
|
|
|
|
|
|
|
|
|
These images extend official Docker images with Deno runtime:
|
|
|
|
|
|
|
|
|
|
| Image | Base | Description |
|
|
|
|
|
|-------|------|-------------|
|
|
|
|
|
| `ht-docker-tools:clickhouse` | clickhouse/clickhouse-server | ClickHouse + Deno |
|
|
|
|
|
| `ht-docker-tools:mongodb` | mongo:latest | MongoDB + Deno |
|
|
|
|
|
| `ht-docker-tools:minio` | minio/minio:latest | MinIO + Deno |
|
|
|
|
|
| `ht-docker-tools:caddy` | caddy:latest | Caddy + Deno |
|
|
|
|
|
| `ht-docker-tools:redis` | redis:latest | Redis + Deno |
|
|
|
|
|
|
|
|
|
|
### Alpine Images
|
|
|
|
|
|
|
|
|
|
Lightweight Alpine-based images with full NVM + Node.js + Deno support:
|
|
|
|
|
|
|
|
|
|
| Image | Description | Size |
|
|
|
|
|
|-------|-------------|------|
|
|
|
|
|
| `ht-docker-tools:clickhouse-alpine` | ClickHouse + NVM + Node.js + Deno | ~250MB |
|
|
|
|
|
| `ht-docker-tools:mongodb-alpine` | MongoDB + NVM + Node.js + Deno | ~200MB |
|
|
|
|
|
| `ht-docker-tools:minio-alpine` | MinIO + NVM + Node.js + Deno | ~200MB |
|
|
|
|
|
| `ht-docker-tools:caddy-alpine` | Caddy + NVM + Node.js + Deno | ~200MB |
|
|
|
|
|
| `ht-docker-tools:redis-alpine` | Redis + NVM + Node.js + Deno | ~200MB |
|
|
|
|
|
|
|
|
|
|
## Quick Start
|
|
|
|
|
|
|
|
|
|
### Using Official Base Images
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# MongoDB with Deno scripting
|
|
|
|
|
docker run -d --name mongo ht-docker-tools:mongodb
|
|
|
|
|
|
|
|
|
|
# Execute Deno script inside container
|
|
|
|
|
docker exec mongo deno run --allow-net script.ts
|
|
|
|
|
|
|
|
|
|
# Redis with Deno
|
|
|
|
|
docker run -d --name redis ht-docker-tools:redis
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Using Alpine Images
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# MongoDB Alpine with Node.js and Deno
|
|
|
|
|
docker run -d --name mongo-alpine ht-docker-tools:mongodb-alpine
|
|
|
|
|
|
|
|
|
|
# Use Node.js
|
|
|
|
|
docker exec mongo-alpine bash -c "node --version"
|
|
|
|
|
|
|
|
|
|
# Use Deno
|
|
|
|
|
docker exec mongo-alpine bash -c "deno --version"
|
|
|
|
|
|
|
|
|
|
# Switch Node versions with NVM
|
|
|
|
|
docker exec mongo-alpine bash -c "nvm install 18 && nvm use 18 && node --version"
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
### Official Base Images
|
|
|
|
|
- Extend official Docker images (MongoDB, MinIO, ClickHouse, Caddy, Redis)
|
|
|
|
|
- Add Deno runtime for scripting and automation
|
|
|
|
|
- Preserve original image entrypoints and configurations
|
|
|
|
|
- Ideal for production use with existing configurations
|
|
|
|
|
|
|
|
|
|
### Alpine Images
|
|
|
|
|
- Lightweight Alpine-based (significantly smaller than official images)
|
|
|
|
|
- Full NVM support for Node.js version switching
|
|
|
|
|
- Node.js LTS (20.18.2) pre-installed
|
|
|
|
|
- Deno runtime included
|
|
|
|
|
- Multi-architecture support (amd64/arm64)
|
|
|
|
|
- Ideal for CI/CD and development environments
|
|
|
|
|
|
|
|
|
|
## Docker Compose Example
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
mongodb:
|
|
|
|
|
image: code.foss.global/host.today/ht-docker-tools:mongodb-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "27017:27017"
|
|
|
|
|
volumes:
|
|
|
|
|
- mongodb_data:/data/db
|
|
|
|
|
command: mongod
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: code.foss.global/host.today/ht-docker-tools:redis-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
|
|
|
|
volumes:
|
|
|
|
|
- redis_data:/data
|
|
|
|
|
command: redis-server
|
|
|
|
|
|
|
|
|
|
minio:
|
|
|
|
|
image: code.foss.global/host.today/ht-docker-tools:minio-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "9000:9000"
|
|
|
|
|
- "9001:9001"
|
|
|
|
|
environment:
|
|
|
|
|
MINIO_ROOT_USER: minioadmin
|
|
|
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
|
|
|
volumes:
|
|
|
|
|
- minio_data:/data
|
|
|
|
|
command: minio server /data --console-address ":9001"
|
|
|
|
|
|
|
|
|
|
caddy:
|
|
|
|
|
image: code.foss.global/host.today/ht-docker-tools:caddy-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
|
|
|
|
- caddy_data:/data
|
|
|
|
|
- caddy_config:/config
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
mongodb_data:
|
|
|
|
|
redis_data:
|
|
|
|
|
minio_data:
|
|
|
|
|
caddy_data:
|
|
|
|
|
caddy_config:
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Building Images Locally
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Clone the repository
|
|
|
|
|
git clone https://code.foss.global/host.today/ht-docker-tools.git
|
|
|
|
|
cd ht-docker-tools
|
|
|
|
|
|
|
|
|
|
# Build all images
|
|
|
|
|
chmod +x build-images.sh
|
|
|
|
|
./build-images.sh
|
|
|
|
|
|
|
|
|
|
# Test all images
|
|
|
|
|
chmod +x test-images.sh
|
|
|
|
|
./test-images.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Multi-Architecture Support
|
|
|
|
|
|
|
|
|
|
All Alpine images support both `linux/amd64` and `linux/arm64` architectures.
|
|
|
|
|
|
|
|
|
|
For CI/CD multi-arch builds:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
docker buildx build \
|
|
|
|
|
--platform linux/amd64,linux/arm64 \
|
|
|
|
|
-f Dockerfile_mongodb_alpine \
|
|
|
|
|
-t code.foss.global/host.today/ht-docker-tools:mongodb-alpine \
|
|
|
|
|
--push .
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## NVM Usage (Alpine Images)
|
|
|
|
|
|
|
|
|
|
Alpine images include NVM for Node.js version management:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Check NVM version
|
|
|
|
|
docker run --rm ht-docker-tools:redis-alpine bash -c "nvm --version"
|
|
|
|
|
|
|
|
|
|
# Install specific Node.js version
|
|
|
|
|
docker run --rm ht-docker-tools:redis-alpine bash -c "nvm install 18 && node --version"
|
|
|
|
|
|
|
|
|
|
# Use in Dockerfile
|
|
|
|
|
FROM code.foss.global/host.today/ht-docker-tools:mongodb-alpine
|
|
|
|
|
RUN nvm install 18 && nvm use 18 && npm install -g typescript
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Registry
|
|
|
|
|
|
|
|
|
|
Images are available at:
|
|
|
|
|
- `code.foss.global/host.today/ht-docker-tools`
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
MIT - Task Venture Capital GmbH
|