Quick setup for Azure DevOps Pipelines.
- Place the
Dockerfilefrom the root of this repository, in the root of your repository. - Place the
.dockerignorefrom the root of this repository, in the root of your repository. - Edit
Dockerfileand replace all instances ofWEB_PROJECT_FOLDER/WEB_PROJECT_NAME.csprojwith the path your web projects csproj file - Edit
Dockerfileand replaceWEB_PROJECT_NAME.dllwith the name of your web projects dll (typically this is the same as your web project csproj file) - Copy the appropriate yaml-pipeline from this folder to your repository root or
.azure-pipelines/folder. - Create a pipeline variable called
WEBHOOK_ENDPOINT(keep it secret) - this should contain the Webhook URL found in UmbPanel
File: dockerhub-pipeline.yml
- Edit
dockerhub-pipeline.ymland replaceDOCKER_USERNAME/DOCKER_IMAGE_NAMEwith your Docker Hub username and image name - Create a Docker Registry service connection in Azure DevOps:
- Go to Project Settings → Service connections
- Create a new Docker Registry connection
- Choose Docker Hub as the registry type
- Name it
DockerHub(or update the pipeline file with your connection name) - Enter your Docker Hub username and password/access token
- Add the pipeline to your Azure DevOps project
File: ghcr-pipeline.yml
- Edit
ghcr-pipeline.ymland replaceGITHUB_ACCOUNT_NAME/DOCKER_IMAGE_NAMEwith your GitHub account/organization and image name - Create a Docker Registry service connection in Azure DevOps:
- Go to Project Settings → Service connections
- Create a new Docker Registry connection
- Choose Others as the registry type
- Docker Registry:
https://ghcr.io - Docker ID: Your GitHub username
- Docker Password: GitHub Personal Access Token with
write:packagespermission - Service connection name:
GitHubContainerRegistry(or update the pipeline file)
- Add the pipeline to your Azure DevOps project
File: acr-pipeline.yml
- Edit
acr-pipeline.ymland replace:YOUR_ACR_NAMEwith your Azure Container Registry name (without.azurecr.io)DOCKER_IMAGE_NAMEwith your desired image name
- Create a Docker Registry service connection in Azure DevOps:
- Go to Project Settings → Service connections
- Create a new Docker Registry connection
- Choose Azure Container Registry as the registry type
- Select your Azure subscription
- Select your Azure Container Registry
- Service connection name:
AzureContainerRegistry(or update the pipeline file)
- Add the pipeline to your Azure DevOps project
File: aws-ecr-pipeline.yml
- Edit
aws-ecr-pipeline.ymland replace:AWS_ACCOUNT_IDwith your AWS account IDAWS_REGIONwith your desired AWS region (e.g.,us-east-1)DOCKER_IMAGE_NAMEwith your desired image name
- Create an ECR repository in AWS (if not already exists)
- Create pipeline variables:
AWS_ACCESS_KEY_ID- Your AWS access key ID (mark as secret)AWS_SECRET_ACCESS_KEY- Your AWS secret access key (mark as secret)- Note: The IAM user should have permissions to push to ECR
- Add the pipeline to your Azure DevOps project
File: quay-pipeline.yml
- Edit
quay-pipeline.ymland replaceQUAY_USERNAME/DOCKER_IMAGE_NAMEwith your Quay.io username and image name - Create a repository on Quay.io (if not already exists)
- Create a Docker Registry service connection in Azure DevOps:
- Go to Project Settings → Service connections
- Create a new Docker Registry connection
- Choose Others as the registry type
- Docker Registry:
https://quay.io - Docker ID: Your Quay.io username or robot account name
- Docker Password: Your Quay.io password or robot account token
- Service connection name:
QuayRegistry(or update the pipeline file)
- Add the pipeline to your Azure DevOps project
File: proget-pipeline.yml
- Edit
proget-pipeline.ymland replace:proget.example.comwith your ProGet server URLdocker-feedwith your ProGet Docker feed nameDOCKER_IMAGE_NAMEwith your desired image name
- Create a Docker Registry service connection in Azure DevOps:
- Go to Project Settings → Service connections
- Create a new Docker Registry connection
- Choose Others as the registry type
- Docker Registry:
https://proget.example.com(use your actual ProGet URL) - Docker ID: Your ProGet username or API key name
- Docker Password: Your ProGet password or API key
- Service connection name:
ProGetRegistry(or update the pipeline file)
- Add the pipeline to your Azure DevOps project
File: gitlab-cr-pipeline.yml
- Edit
gitlab-cr-pipeline.ymland replaceGITLAB_GROUP/GITLAB_PROJECT/DOCKER_IMAGE_NAMEwith your GitLab group, project, and image name - Create a Docker Registry service connection in Azure DevOps:
- Go to Project Settings → Service connections
- Create a new Docker Registry connection
- Choose Others as the registry type
- Docker Registry:
https://registry.gitlab.com - Docker ID: Your GitLab username
- Docker Password: Your GitLab personal access token or deploy token with
write_registryscope - Service connection name:
GitLabContainerRegistry(or update the pipeline file)
- Add the pipeline to your Azure DevOps project
- All pipelines use timestamp-based tagging for version control:
HHMMSSDDMMYYYY - Each image is also tagged with
latestfor convenience - Pipelines support git submodules automatically
- Make sure your service connections have the necessary permissions to push to the registries