Skip to content

Commit 12ca5ed

Browse files
jackaltxclaude
andauthored
Unified build system with lsof support (#1)
* Refactor build system to unified distro-version approach Major changes: - Unified Containerfiles: debian/ (debian+ubuntu), rocky/ (rocky) - New build syntax: ./build.sh -d DISTRO -v VERSION - Registry config: ~/.secrets/testing-containers-registry.conf - Image naming: distro-ssh:version (e.g., rocky-ssh:9, not rocky9x-ssh) - Removed old version-specific directories New workflow: source ~/.secrets/testing-containers-registry.conf gitea ./build.sh -d debian -v 13 ./run-podman.sh -d debian -v 13 Tested: debian-ssh:13 builds and pushes to Gitea successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Remove defaults from run-podman.sh - require explicit args Changed run-podman.sh to require -d and -v flags (no defaults). Rebuilt debian-ssh:13 successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add lsof package to debian/ubuntu containers Added lsof to debian/Containerfile package list. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add lsof to all containers and update documentation - Added lsof package to debian/Containerfile (Debian & Ubuntu) - Added lsof package to rocky/Containerfile (Rocky Linux) - Added registry login to run-podman.sh for authenticated pulls - Updated README.md with new -d/-v syntax and sanitized registry config - Verified: debian-ssh:12, debian-ssh:13, rocky-ssh:9 all have lsof working 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 469bbd9 commit 12ca5ed

12 files changed

Lines changed: 341 additions & 567 deletions

File tree

.working/rocky93-ssh/Containerfile

Lines changed: 0 additions & 107 deletions
This file was deleted.

.working/rocky93-ssh/inventory.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.working/rocky93-ssh/playbook.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

CLAUDE.md

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,29 @@ These are deliberately minimal - don't suggest adding features. User wants stock
1111
## Quick Commands
1212

1313
```bash
14-
# Build (requires SSH_KEY and token)
15-
./build.sh debian12-ssh
16-
./build.sh rocky9x-ssh
17-
./build.sh ubuntu24-ssh
14+
# Setup registry credentials (required first step)
15+
source ~/.secrets/testing-containers-registry.conf github # For GitHub
16+
source ~/.secrets/testing-containers-registry.conf gitea # For Gitea lab
17+
18+
# Build containers
19+
./build.sh -d debian -v 12
20+
./build.sh -d debian -v 13
21+
./build.sh -d rocky -v 9
22+
./build.sh -d rocky -v 10
23+
./build.sh -d ubuntu -v 24
1824

1925
# Test locally
20-
export CONTAINER_TYPE=debian12-ssh
21-
./run-podman.sh
26+
./run-podman.sh -d debian -v 13
2227
ssh -p 2222 jackaltx@localhost
2328
./cleanup-podman.sh
2429
```
2530

2631
## What's Included
2732

28-
Three distributions:
29-
- **debian12-ssh**: Debian 12, apt, OpenSSH
30-
- **rocky9x-ssh**: Rocky Linux 9.x, dnf, OpenSSH
31-
- **ubuntu24-ssh**: Ubuntu 24.04 LTS, apt, OpenSSH
33+
Supported distributions:
34+
- **debian**: Debian 12, 13 (apt, OpenSSH)
35+
- **rocky**: Rocky Linux 9, 10 (dnf, OpenSSH)
36+
- **ubuntu**: Ubuntu 24.04 LTS (apt, OpenSSH)
3237

3338
Each has:
3439
- Python 3 (Ansible requirement)
@@ -40,24 +45,50 @@ Each has:
4045

4146
```bash
4247
# Syntax
43-
./build.sh <container-type>
48+
./build.sh -d DISTRO -v VERSION
49+
50+
# Examples
51+
./build.sh -d debian -v 13
52+
./build.sh -d rocky -v 9
53+
./build.sh -d ubuntu -v 24
54+
55+
# Required environment (set by sourcing registry config)
56+
SSH_KEY # Public key to inject
57+
CONTAINER_TOKEN # Registry authentication token
58+
REGISTRY_HOST # Registry URL (ghcr.io or gitea.a0a0.org:3001)
59+
REGISTRY_USER # Registry username (jackaltx)
60+
REGISTRY_REPO # Repository name (testing-containers)
61+
```
62+
63+
## Registry Configuration
4464

45-
# Environment variables
46-
SSH_KEY # Required - public key to inject
47-
CONTAINER_TOKEN # For ghcr.io (default registry)
48-
GITEA_TOKEN # For Gitea registry
49-
REGISTRY_HOST # Defaults to ghcr.io
65+
Registry credentials stored in `~/.secrets/testing-containers-registry.conf` (NOT in repo):
66+
67+
```bash
68+
# GitHub Container Registry
69+
source ~/.secrets/testing-containers-registry.conf github
70+
71+
# Gitea Lab Registry
72+
source ~/.secrets/testing-containers-registry.conf gitea
5073
```
5174

5275
## Key Files
5376

54-
- `debian12-ssh/Containerfile` - Debian build definition
55-
- `rocky9x-ssh/Containerfile` - Rocky build definition
56-
- `ubuntu24-ssh/Containerfile` - Ubuntu build definition
77+
- `debian/Containerfile` - Debian/Ubuntu build definition (parameterized)
78+
- `rocky/Containerfile` - Rocky build definition (parameterized)
5779
- `build.sh` - Build and push script
5880
- `run-podman.sh` - Local test runner
5981
- `cleanup-podman.sh` - Clean up test containers
6082

83+
## Image Naming
84+
85+
Output images follow pattern: `{distro}-ssh:{version}`
86+
87+
Examples:
88+
- `ghcr.io/jackaltx/testing-containers/debian-ssh:13`
89+
- `ghcr.io/jackaltx/testing-containers/rocky-ssh:9`
90+
- `gitea.a0a0.org:3001/jackaltx/testing-containers/ubuntu-ssh:24`
91+
6192
## Design Philosophy
6293

6394
**Keep it minimal.** Don't suggest:

0 commit comments

Comments
 (0)