32 lines
1.0 KiB
Bash
32 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
# Specify the path to your docker-compose.yml
|
|
composeFile="C:/Users/santh/OneDrive/Desktop/DOCKERS/ubuntu/Sprint6/C1011/Backend-API-Services/DamageAssesmentApi/docker-compose.yml"
|
|
|
|
# List of services to build, tag, and push
|
|
services=(
|
|
"damageassesmentapianswers"
|
|
"damageassesmentapiattachments"
|
|
"damageassesmentapiemployees"
|
|
"damageassesmentapilocations"
|
|
"damageassesmentapiquestions"
|
|
"damageassesmentapisurveys"
|
|
"damageassesmentapidoculinks"
|
|
"damageassesmentapiresponses"
|
|
)
|
|
|
|
# Log in to ACR (replace ACR_USERNAME and ACR_PASSWORD)
|
|
docker login dadeschoolscontainerregistry.azurecr.io -u dadeSchoolsContainerRegistry -p k1f8hE0O5hj3tYCCR/5stNrkw5BZoTmAqid/hvaVo8+ACRDc2Arn
|
|
|
|
# Loop through the services and build, tag, and push
|
|
for service in "${services[@]}"; do
|
|
# Build the service
|
|
docker-compose -f "$composeFile" build "$service"
|
|
|
|
# Tag the image for ACR
|
|
docker tag "$service" "dadeschoolscontainerregistry.azurecr.io/$service"
|
|
|
|
# Push the image to ACR
|
|
docker push "dadeschoolscontainerregistry.azurecr.io/$service"
|
|
done
|