-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_docker.sh
More file actions
executable file
·37 lines (33 loc) · 1.13 KB
/
test_docker.sh
File metadata and controls
executable file
·37 lines (33 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# test_docker.sh
#
# This script provides a simple way to test the kshark Docker image.
# It mounts the necessary configuration files from your local machine
# into the container and runs the kshark tool.
#
# Prerequisites:
# 1. A running Docker daemon.
# 2. A 'kshark:latest' Docker image built from the Dockerfile.
# 3. 'client.properties' and 'ai_config.json' files in the current directory.
#
# Usage:
# 1. Make the script executable: chmod +x test_docker.sh
# 2. Run the script: ./test_docker.sh
# Build the Docker image if it doesn't exist locally
if ! docker image inspect kshark:latest >/dev/null 2>&1; then
echo "Image 'kshark:latest' not found locally. Building..."
make docker
fi
# Create a directory for the reports if it doesn't exist
mkdir -p reports
# Run the kshark container
docker run --rm -it \
-v "$(pwd)/client.properties:/app/client.properties" \
-v "$(pwd)/ai_config.json:/app/ai_config.json" \
-v "$(pwd)/license.key:/app/license.key" \
-v "$(pwd)/reports:/app/reports" \
kshark:latest \
--props client.properties \
--topic partnersales,inventory,orders \
--json reports/report.json \
--analyze