Building images and pushing them to private registries
- Create a linux vm
- Install docker
- Install aws cli and authenticate
-
INstall azure cli and authenicate
-
Clone the repo
git clone https://github.com/Azure-Samples/aks-store-demo.git
Azure Container Registry
image: ${ACR_SERVICE}/learning/order-service:${IMAGE_TAG:-latest}
Elastic Container Registry
- Lets set the following variables
export AWS_REGION=ap-south-1
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
export ECR_REGISTRY="${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com"
export IMAGE_TAG=v1.0.0
echo $IMAGE_TAG
echo $ECR_REGISTRY
- We need to create repositories once
aws ecr create-repository \
--repository-name learning/ai-service \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/makeline-service \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/order-service \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/product-service \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/store-admin \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/store-front \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/virtual-customer \
--region "$AWS_REGION"
aws ecr create-repository \
--repository-name learning/virtual-worker \
--region "$AWS_REGION"
Exercise
- Apply the same approach for