Search code examples
azuredockerdeploymentteamcityazure-service-fabric

How to deploy Docker container automated in Azure Service Fabric with TeamCity?


I want to deploy a Docker container in a Azure Service Fabric. For this I implemented a Node.js service and wrote my dockerfile. I tested the service on my local machine with Docker and it worked. My next step was to build the Docker image on TeamCity. I use a Docker runner for it and it worked too. Now I want to deploy this image to an Azure Service Fabric cluster. But I did not find any documentation.

My idea is to use the artifact (docker image) from my build step, and deploy it directly to a Service Fabric cluster. Is this possible? If not, how can I deploy my image there?

Thanks for the help!


Solution

    1. Use your build server to create a container image
    2. From the build server, push the image to a container registry like Docker Hub or Azure Container Registry.
    3. Deploy a Service Fabric service that uses the image to run a container.