Skip to content

Instantly share code, notes, and snippets.

@ratio91
Created October 7, 2019 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ratio91/317b05a607ad576d60bec41b8a15cb7a to your computer and use it in GitHub Desktop.
Save ratio91/317b05a607ad576d60bec41b8a15cb7a to your computer and use it in GitHub Desktop.
Azure DevOps build pipeline for docker container build and registry upload
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
dockerId: $(dockerId)
imageName: core
steps:
- script: |
docker build -t $(dockerId).azurecr.io/$(imageName) .
docker login -u $(dockerId) -p $pswd $(dockerId).azurecr.io
docker push $(dockerId).azurecr.io/$(imageName)
env:
pswd: $(dockerPassword)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment