-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·34 lines (31 loc) · 761 Bytes
/
build.sh
File metadata and controls
executable file
·34 lines (31 loc) · 761 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
32
33
34
#!/bin/bash
REGISTRY="ayenisholah"
VERSION="latest" # Allow version override
# Build and tag both images
build_images() {
echo "Building Docker images..."
docker build -t $REGISTRY/bidding-bot-server:$VERSION -f Dockerfile .
docker build -t $REGISTRY/bidding-bot-client:$VERSION -f client/Dockerfile ./client
}
# Push both images
push_images() {
echo "Pushing Docker images..."
docker push $REGISTRY/bidding-bot-server:$VERSION
docker push $REGISTRY/bidding-bot-client:$VERSION
}
case "$1" in
"build")
build_images
;;
"push")
push_images
;;
"all")
build_images
push_images
;;
*)
echo "Usage: $0 {build|push|all} [version]"
exit 1
;;
esac