source: build-push.sh@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100755
File size: 1.1 KB
RevLine 
[79a0317]1arg=${1}
2
3case $arg in
4 a)
5 echo "Building and pushing all images..."
6 docker build -t stevetosak/imaps-frontend:latest imaps-frontend/
7 docker build -t stevetosak/imaps-backend:latest imaps-backend/backendRender/
8 docker push stevetosak/imaps-frontend:latest
9 docker push stevetosak/imaps-backend:latest
10 ;;
11 f)
12 echo "Building and pushing frontend image..."
13 docker build -t stevetosak/imaps-frontend:latest imaps-frontend/
14 docker push stevetosak/imaps-frontend:latest
15 ;;
16 b)
17 echo "Building and pushing backend image..."
18 docker build -t stevetosak/imaps-backend:latest imaps-backend/backendRender/
19 docker push stevetosak/imaps-backend:latest
20 ;;
21 help)
22 echo "Builds docker images and pushes them to the stevetosak repository on Docker Hub."
23 echo "Use option 'a' to build and push the frontend and backend."
24 echo "Use option 'b' to build and push only the backend."
25 echo "Use option 'f' to build and push only the frontend."
26 echo "Example usage: ./build-push.sh <option>"
27 ;;
28 *)
29 echo "Error: Invalid argument. Please use 'a', 'b', or 'f'."
30 echo "Terminating..."
31 exit 0
32 ;;
33esac
Note: See TracBrowser for help on using the repository browser.