Restructure Dockerfiles and add Oh My Zsh support
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.
This commit is contained in:
61
Makefile
61
Makefile
@@ -5,88 +5,75 @@ help:
|
||||
@echo "File Analysis Container - Build System"
|
||||
@echo ""
|
||||
@echo "Available targets:"
|
||||
@echo " build-upstream Build from REMnux upstream image (recommended)"
|
||||
@echo " build Build from REMnux upstream image (recommended, default)"
|
||||
@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-remnux Test REMnux 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 " shell Interactive shell (REMnux build)"
|
||||
@echo " shell-scratch Interactive shell (scratch build)"
|
||||
@echo " coverage Check help coverage"
|
||||
@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:
|
||||
@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-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
|
||||
build-all: build build-scratch
|
||||
@echo "✓ All variants built successfully"
|
||||
|
||||
# Test targets
|
||||
test: test-upstream test-scratch test-kali
|
||||
test: test-remnux test-scratch
|
||||
@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-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"
|
||||
@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"
|
||||
|
||||
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:latest
|
||||
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:latest
|
||||
-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:
|
||||
docker run -it --rm -v "$$(pwd):/data" tabledevil/file-analysis:latest
|
||||
|
||||
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..."
|
||||
|
||||
Reference in New Issue
Block a user