Skip to content

Commit af60865

Browse files
committed
Script to build all images
1 parent f458f39 commit af60865

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

build-all-images.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Change directory to where the Dockerfiles are located
4+
cd ./docker
5+
6+
# Iterate over each Dockerfile in the directory
7+
for dockerfile in *; do
8+
# Check if the file is actually a Dockerfile
9+
if [ -f "$dockerfile" ] && [ "${dockerfile##*.}" == "Dockerfile" ]; then
10+
# Extract image name from Dockerfile name
11+
image_name="${dockerfile%Dockerfile}"
12+
# Remove the last character from the image name
13+
image_name="${image_name%?}"
14+
# Interpolate image_name with "solana."
15+
image_name="solana.$image_name"
16+
echo "Building image: $image_name"
17+
# Build the Docker image
18+
docker build -t "$image_name" -f "$dockerfile" .
19+
fi
20+
done

0 commit comments

Comments
 (0)