Skip to content

Instantly share code, notes, and snippets.

@northtyphoon
Created January 8, 2022 08:56
Show Gist options
  • Save northtyphoon/675fec4ebf5005f73ee61c02b3a8c7cd to your computer and use it in GitHub Desktop.
Save northtyphoon/675fec4ebf5005f73ee61c02b3a8c7cd to your computer and use it in GitHub Desktop.

Prepare

Create a test folder with the following 3 files

  1. Dockerfile
version: v1.1.0

steps:
 - build: -t $Registry/buildkitimage:latest --secret id=mysecret,src=mysecret.txt . 
   env: ["DOCKER_BUILDKIT=1"]
 - push: 
     - $Registry/buildkitimage:latest
  1. mysecret.txt
!my secret content!
  1. acb.yaml
version: v1.1.0

steps:
 - build: -t $Registry/buildkitimage:latest --secret id=mysecret,src=mysecret.txt . 
   env: ["DOCKER_BUILDKIT=1"]
 - push: 
     - $Registry/buildkitimage:latest

Run

cd test && az acr run -r myregistry -f acb.yaml .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment