Major repository cleanup and enhancement
- Reorganize documentation: moved old docs to docs/ directory - Add comprehensive README.md with build options and usage guide - Add detailed CONTRIBUTING.md with help content management guide - Create Makefile for automated building and testing - Add Dockerfile.scratch for building from Ubuntu 20.04 base - Enhance all Dockerfiles with PowerShell + PSScriptAnalyzer - Add modern shells: zsh (with plugins) and fish (with config) - Add modern CLI tools: fd-find, ripgrep, fzf - Create comprehensive help system with cheat/TLDR/fish completions - Add helper scripts for help content management and coverage checking - Fix Dockerfile.remnux script references - Support three build variants: upstream (REMnux), scratch (Ubuntu), kali Build options: - make build-upstream: Fast, uses REMnux upstream (recommended) - make build-scratch: Full control, builds from Ubuntu 20.04 - make build-kali: Legacy Kali Linux base Features: - PowerShell with PSScriptAnalyzer module - Modern shells (zsh, fish) with custom configurations - Enhanced help system (cheat sheets, TLDR pages, fish completions) - Help coverage checking and bulk import tools - Comprehensive documentation for users and contributors
This commit is contained in:
93
Makefile
Normal file
93
Makefile
Normal file
@@ -0,0 +1,93 @@
|
||||
.PHONY: help build-upstream build-scratch build-kali build-all test clean push
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@echo "File Analysis Container - Build System"
|
||||
@echo ""
|
||||
@echo "Available targets:"
|
||||
@echo " build-upstream Build from REMnux upstream image (recommended)"
|
||||
@echo " build-scratch Build from Ubuntu 20.04 base (full control)"
|
||||
@echo " build-kali Build from Kali Linux base (legacy)"
|
||||
@echo " build-all Build all variants"
|
||||
@echo " test Run tests on all builds"
|
||||
@echo " test-upstream Test upstream build"
|
||||
@echo " test-scratch Test scratch build"
|
||||
@echo " test-kali Test Kali build"
|
||||
@echo " push Push images to Docker Hub"
|
||||
@echo " clean Remove all built images"
|
||||
@echo ""
|
||||
|
||||
# Build targets
|
||||
build-upstream:
|
||||
@echo "Building REMnux upstream variant..."
|
||||
docker build -f Dockerfile.remnux -t tabledevil/file-analysis:remnux .
|
||||
@echo "✓ Build complete: tabledevil/file-analysis:remnux"
|
||||
|
||||
build-scratch:
|
||||
@echo "Building from scratch (Ubuntu 20.04 base)..."
|
||||
docker build -f Dockerfile.scratch -t tabledevil/file-analysis:scratch .
|
||||
@echo "✓ Build complete: tabledevil/file-analysis:scratch"
|
||||
|
||||
build-kali:
|
||||
@echo "Building Kali Linux variant..."
|
||||
docker build -f Dockerfile -t tabledevil/file-analysis:kali .
|
||||
@echo "✓ Build complete: tabledevil/file-analysis:kali"
|
||||
|
||||
build-all: build-upstream build-scratch build-kali
|
||||
@echo "✓ All variants built successfully"
|
||||
|
||||
# Test targets
|
||||
test: test-upstream test-scratch test-kali
|
||||
@echo "✓ All tests passed"
|
||||
|
||||
test-upstream:
|
||||
@echo "Testing REMnux upstream build..."
|
||||
@docker run --rm tabledevil/file-analysis:remnux bash -c "which fhelp && fhelp cheat pdfid"
|
||||
@docker run --rm tabledevil/file-analysis:remnux bash -c "which pdfid.py && which capa && which visidata"
|
||||
@echo "✓ Upstream build tests passed"
|
||||
|
||||
test-scratch:
|
||||
@echo "Testing scratch build..."
|
||||
@docker run --rm tabledevil/file-analysis:scratch bash -c "which fhelp && fhelp cheat pdfid"
|
||||
@docker run --rm tabledevil/file-analysis:scratch bash -c "which pdfid.py && which capa"
|
||||
@echo "✓ Scratch build tests passed"
|
||||
|
||||
test-kali:
|
||||
@echo "Testing Kali build..."
|
||||
@docker run --rm tabledevil/file-analysis:kali bash -c "which pdfid.py && which capa"
|
||||
@docker run --rm tabledevil/file-analysis:kali bash -c "which pwsh"
|
||||
@echo "✓ Kali build tests passed"
|
||||
|
||||
# Docker Hub push
|
||||
push:
|
||||
@echo "Pushing images to Docker Hub..."
|
||||
docker push tabledevil/file-analysis:remnux
|
||||
docker push tabledevil/file-analysis:scratch
|
||||
docker push tabledevil/file-analysis:kali
|
||||
docker tag tabledevil/file-analysis:remnux tabledevil/file-analysis:latest
|
||||
docker push tabledevil/file-analysis:latest
|
||||
@echo "✓ Images pushed successfully"
|
||||
|
||||
# Clean up
|
||||
clean:
|
||||
@echo "Removing built images..."
|
||||
-docker rmi tabledevil/file-analysis:remnux
|
||||
-docker rmi tabledevil/file-analysis:scratch
|
||||
-docker rmi tabledevil/file-analysis:kali
|
||||
-docker rmi tabledevil/file-analysis:latest
|
||||
@echo "✓ Cleanup complete"
|
||||
|
||||
# Interactive shells for testing
|
||||
shell-upstream:
|
||||
docker run -it --rm -v "$$(pwd):/data" tabledevil/file-analysis:remnux
|
||||
|
||||
shell-scratch:
|
||||
docker run -it --rm -v "$$(pwd):/data" tabledevil/file-analysis:scratch
|
||||
|
||||
shell-kali:
|
||||
docker run -it --rm -v "$$(pwd):/data" tabledevil/file-analysis:kali
|
||||
|
||||
# Run help coverage check
|
||||
coverage:
|
||||
@echo "Checking help coverage..."
|
||||
docker run --rm tabledevil/file-analysis:remnux check-help-coverage.sh
|
||||
Reference in New Issue
Block a user