Build and publish Docker container to Container Registry (CI pipeline) and deploy image to a Container Instance in a subsequent CD pipeline. The concept of independent pipelines for CI & CD is adapted from the snippet cascading-ci-cd-pipelines
.
The application used for this sample is taken from the official Docker tutorial.
The image is built and pushed on every build using the ID of the pipeline run as tag. When deploying a build (i.e. release) to stages, this ID is taken to reference the Docker image in the runtime environment (in this case Container Instance, but could also be Kubernetes Service or an App Service).
Access keys
) and copy password for usage in piplinesDocker Registry
-> Azure Container Registry
)