-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcreateLocalFipsDockerScript.sh
More file actions
executable file
·34 lines (26 loc) · 1.09 KB
/
Copy pathcreateLocalFipsDockerScript.sh
File metadata and controls
executable file
·34 lines (26 loc) · 1.09 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
#!/bin/bash
# Exit on any error
set -e
echo "Starting build process..."
# Navigate up one folder and into Semoss
echo "Building Semoss..."
cd ../../Semoss
mvn clean install -U -DskipTests=true
# Navigate up one folder and into Monolith
# The fips profile keeps BouncyCastle out of the war, the container supplies it
echo "Building Monolith..."
cd ../Monolith
mvn clean install -U -DskipTests=true -P dev,fips
# Build Docker image from parent directory to access target folder
echo "Building Docker image..."
docker build --no-cache -f local-docker-testing/Dockerfile.fips -t local-monolith-fips .
echo "Build process completed successfully!"
cd local-docker-testing
# Optional: pass --push to publish, or set IMAGE_TAG to retag first
if [ "$1" = "--push" ]; then
docker tag local-monolith-fips "${IMAGE_TAG:-local-monolith-fips}"
docker push "${IMAGE_TAG:-local-monolith-fips}"
fi
echo "Optional: attempting to use trivy to scan image"
trivy image --severity HIGH,CRITICAL --scanners vuln --output results-fips.txt local-monolith-fips:latest
echo "Done scanning image, output file in results-fips.txt"