https://github.com/demo42/baseimage-node
export DEMO_NAME=demo42
export ACR_NAME=demo42t
export AKV_NAME=demo42
export LOCATION=southcentralus
export RESOURCE_GROUP=$DEMO_NAME
export GIT_BASE_IMAGE_NODE=https://github.com/demo42/baseimage-node.git
export GIT_TOKEN_NAME=${DEMO_NAME}-git-token
az configure --defaults acr=$ACR_NAME
az acr create -n $ACR_NAME -l $LOCATION -g $RESOURCE_GROUP --sku standard
- See ACR Build Docs for specific permissions
- Copy the PAT
-
Create the KeyVault
az keyvault create --resource-group $RESOURCE_GROUP --name $AKV_NAME
-
Save the Github Personal Access Token
az keyvault secret set \ --vault-name $AKV_NAME \ --name $GIT_TOKEN_NAME \ --value <past-PAT-value>
-
Verify the values were saved
az keyvault secret show \ --vault-name $AKV_NAME \ --name $GIT_TOKEN_NAME \ --query value -o tsv
az acr task create \
--registry ${ACR_NAME} \
-n base-image-node \
-f acr-task.yaml \
--context $BASE_IMAGE_NODE_REPO \
--git-access-token $(az keyvault secret show \
--vault-name $AKV_NAME \
--name $GIT_TOKEN_NAME \
--query value -o tsv)
az acr task run --registry demo42t -n base-image-node