-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBuildAndPush-Containers.ps1
31 lines (23 loc) · 1.11 KB
/
BuildAndPush-Containers.ps1
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
#Requires -Version 3.0
Param(
[Parameter(Mandatory=$True)]
[string]
$DockerRegistryUrl
)
# stop the script on first error
$ErrorActionPreference = 'Stop'
Write-Host "-------------------------------------------------------"
Write-Host "Building and pushing the notification producer image..."
$NotificationProducerImageName = "$DockerRegistryUrl/notification-producer"
docker build -f ./NotificationProducer/Dockerfile -t $NotificationProducerImageName ./NotificationProducer
docker push $NotificationProducerImageName
Write-Host "------------------------------------------------------"
Write-Host "Building and pushing the backend for frontend image..."
$BffImageName = "$DockerRegistryUrl/backend-for-frontend"
docker build -f ./BackendForFrontend/Dockerfile -t $BffImageName ./BackendForFrontend
docker push $BffImageName
Write-Host "------------------------------------------------------"
Write-Host "Building and pushing the frontend image..."
$FrontendImageName = "$DockerRegistryUrl/frontend"
docker build -f ./Frontend/Dockerfile -t $FrontendImageName --build-arg IS_CLOUD=true ./Frontend
docker push $FrontendImageName