#!/bin/bash # Script to run Dockerfile auditing tools inside the toolbox-qadocker container set -e if [ -z "$1" ]; then echo "Usage: $0 " echo "Example: $0 Dockerfile" echo "This script mounts the current directory and runs auditing tools inside the container" exit 1 fi DOCKERFILE_PATH="$1" if [ ! -f "$DOCKERFILE_PATH" ]; then echo "Error: Dockerfile not found at $DOCKERFILE_PATH" exit 1 fi echo "Running Dockerfile audit using toolbox-qadocker container..." echo "Auditing Dockerfile: $DOCKERFILE_PATH" echo # Run the audit using the container docker run --rm \ -v "$(pwd)":/workspace \ -w /workspace \ tsysdevstack-toolboxstack-toolbox-qadocker:dev \ bash -c "./test-qa.sh && echo '' && echo 'Running custom audit script...' && ./audit-dockerfile.sh $DOCKERFILE_PATH" echo echo "Audit completed!"