-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-docker.sh
More file actions
executable file
·31 lines (24 loc) · 944 Bytes
/
build-docker.sh
File metadata and controls
executable file
·31 lines (24 loc) · 944 Bytes
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
#!/bin/bash
# Script to build the Docker image for the IaM-Alliance Vetting System
#set -e # Exit immediately if a command exits with a non-zero status
# Define variables
IMAGE_NAME="iam-alliance-vetting"
TAG=$(date +"%Y%m%d-%H%M%S")
LATEST_TAG="latest"
# Show script information
echo "Building Docker image for IaM-Alliance Vetting System"
echo "Image name: $IMAGE_NAME"
echo "Image tag: $TAG"
# Build the Docker image with the current timestamp tag
echo "Building Docker image: $IMAGE_NAME:$TAG..."
docker --debug build -t $IMAGE_NAME:$TAG .
# Also tag it as latest
echo "Tagging image as $IMAGE_NAME:$LATEST_TAG..."
docker --debug tag $IMAGE_NAME:$TAG $IMAGE_NAME:$LATEST_TAG
echo "Image build complete."
echo "To run the application with Docker Compose, use:"
echo " docker compose up -d"
echo ""
echo "To push the image to a repository, use:"
echo " docker push $IMAGE_NAME:$TAG"
echo " docker push $IMAGE_NAME:$LATEST_TAG"