Major changes:
- Dockerfile now builds the REMnux-based image (was Dockerfile.remnux)
- Removed redundant Dockerfile.remnux
- Dockerfile.scratch builds from Ubuntu 20.04 (from scratch variant)
- Updated Makefile to reflect new structure:
- 'make build' for REMnux-based (default)
- 'make build-scratch' for Ubuntu-based
- Removed kali references
- Simplified targets and naming
Zsh improvements:
- Added Oh My Zsh auto-installation on first run
- Pre-install Oh My Zsh in Docker images for remnux user
- Custom prompt with 🔍 indicator for analysis work
- Fallback to minimal config for system users
- Includes plugins: git, docker, command-not-found, colored-man-pages
- Welcome message shows only once per session
- No more first-time configuration prompts
Shell experience:
- bash (default) - traditional, reliable
- zsh - now with Oh My Zsh, custom theme, plugins
- fish - friendly interactive shell
All shells include help aliases and analysis shortcuts.
81 lines
3.0 KiB
Makefile
81 lines
3.0 KiB
Makefile
.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 Build from REMnux upstream image (recommended, default)"
|
|
@echo " build-scratch Build from Ubuntu 20.04 base (full control)"
|
|
@echo " build-all Build all variants"
|
|
@echo " test Run tests on all builds"
|
|
@echo " test-remnux Test REMnux build"
|
|
@echo " test-scratch Test scratch build"
|
|
@echo " push Push images to Docker Hub"
|
|
@echo " clean Remove all built images"
|
|
@echo " shell Interactive shell (REMnux build)"
|
|
@echo " shell-scratch Interactive shell (scratch build)"
|
|
@echo " coverage Check help coverage"
|
|
@echo ""
|
|
|
|
# Build targets
|
|
build:
|
|
@echo "Building REMnux-based file analysis container..."
|
|
docker build -t tabledevil/file-analysis:latest .
|
|
docker tag tabledevil/file-analysis:latest tabledevil/file-analysis:remnux
|
|
@echo "✓ Build complete: tabledevil/file-analysis:latest"
|
|
|
|
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-all: build build-scratch
|
|
@echo "✓ All variants built successfully"
|
|
|
|
# Test targets
|
|
test: test-remnux test-scratch
|
|
@echo "✓ All tests passed"
|
|
|
|
test-remnux:
|
|
@echo "Testing REMnux build..."
|
|
@docker run --rm tabledevil/file-analysis:latest bash -c "which fhelp && fhelp cheat pdfid"
|
|
@docker run --rm tabledevil/file-analysis:latest bash -c "which pdfid.py && which capa && which visidata"
|
|
@docker run --rm tabledevil/file-analysis:latest bash -c "zsh --version && fish --version"
|
|
@echo "✓ REMnux 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 && which pwsh"
|
|
@docker run --rm tabledevil/file-analysis:scratch bash -c "zsh --version && fish --version"
|
|
@echo "✓ Scratch build tests passed"
|
|
|
|
# Docker Hub push
|
|
push:
|
|
@echo "Pushing images to Docker Hub..."
|
|
docker push tabledevil/file-analysis:latest
|
|
docker push tabledevil/file-analysis:remnux
|
|
docker push tabledevil/file-analysis:scratch
|
|
@echo "✓ Images pushed successfully"
|
|
|
|
# Clean up
|
|
clean:
|
|
@echo "Removing built images..."
|
|
-docker rmi tabledevil/file-analysis:latest
|
|
-docker rmi tabledevil/file-analysis:remnux
|
|
-docker rmi tabledevil/file-analysis:scratch
|
|
@echo "✓ Cleanup complete"
|
|
|
|
# Interactive shells for testing
|
|
shell:
|
|
docker run -it --rm -v "$$(pwd):/data" tabledevil/file-analysis:latest
|
|
|
|
shell-scratch:
|
|
docker run -it --rm -v "$$(pwd):/data" tabledevil/file-analysis:scratch
|
|
|
|
# Run help coverage check
|
|
coverage:
|
|
@echo "Checking help coverage..."
|
|
docker run --rm tabledevil/file-analysis:remnux check-help-coverage.sh
|