refactor: Restructure project for Docker compliance and documentation

- Move documentation to docs/ directory for better organization
- Add bin/ directory for utility scripts
- Add lib/ for shared library functions
- Update all build scripts to ensure strict Docker compliance
- Enhance AGENTS.md with Docker container requirements
- Create comprehensive compliance and security documentation
- Reorganize test suite with improved structure
- Remove obsolete Dockerfile and archive documentation
- Add final security compliance report

BREAKING CHANGE: Restructured project layout with moved documentation directories

💘 Generated with Crush

Assisted-by: GLM-4.6 via Crush <crush@charm.land>
This commit is contained in:
2026-01-21 15:37:03 -05:00
parent 6cd53bc7ba
commit 67c106a3b6
39 changed files with 2070 additions and 2338 deletions

33
lib/docker.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# Docker utility functions
set -euo pipefail
# Clean up Docker containers on exit
cleanup_docker() {
local container_name="${1:-}"
if [ -n "$container_name" ] && docker ps -q --filter "name=^${container_name}$" | grep -q .; then
echo "Removing Docker container: $container_name"
docker rm -f "$container_name" || true
fi
}
# Run Docker container with automatic cleanup
run_container() {
local image="${1:-}"
local name="${2:-}"
local cmd="${3:-}"
# Clean up existing container if it exists
cleanup_docker "$name"
# Run new container with explicit name
echo "Starting Docker container: $name"
docker run --name "$name" -it --rm "$image" $cmd
}
# Execute command in container
exec_in_container() {
local container="${1:-}"
shift
docker exec -it "$container" "$@"
}