Files
football/bin/docker-manage.sh
Charles N Wyble 67c106a3b6 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>
2026-01-21 15:37:03 -05:00

47 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Utility script to manage Docker containers
set -euo pipefail
case "${1:-}" in
cleanup | clean)
echo "Removing containers..."
docker ps -a --filter "name=knel-football" -q | xargs -r docker rm -f
docker images --filter "reference=knel-football:*" -q | xargs -r docker rmi -f
echo "Cleanup completed."
;;
stop)
echo "Stopping containers..."
docker ps --filter "name=knel-football" -q | xargs -r docker stop
echo "Containers stopped."
;;
logs)
if [ -z "${2:-}" ]; then
echo "Usage: $0 logs <container>"
exit 1
fi
docker logs "knel-football-${2}"
;;
exec)
if [ -z "${2:-}" ]; then
echo "Usage: $0 exec <container> [command]"
exit 1
fi
shift
docker exec -it "knel-football-${1}" "${@:2}"
;;
status | st)
echo "Container status:"
docker ps -a --filter "name=knel-football" --format "table {{.Names}}\t{{.Status}}"
;;
*)
echo "Usage: $0 {cleanup|stop|logs|exec|status}"
echo "Commands:"
echo " cleanup - Remove all containers and images"
echo " stop - Stop all running containers"
echo " logs - Show container logs"
echo " exec - Execute command in container"
echo " status - Show container status"
exit 1
;;
esac