Is it possible to use TeamCity to build Windows docker container images?
As subj says. Is it possible to do? Visual Studio Online provides option to use remote build agent to create Windows Container Images based on dockerfile, wondering is TeamCity has this capability.
Jenkins also has it. https://plugins.jenkins.io/docker-commons
Spent quite sometime going through documentation and can not find anything about TeamCity support for building docker images. Starting to think TeamCity does not have this capability and our company made wrong decision to use TeamCity.
Please sign in to leave a comment.
Hello,
Do I correctly understand that you want to run builds in docker container? At the moment there is no official TeamCity plugin. You can use Command line build step to run docker image on agent. Also you can try a third-party plugin: https://github.com/jonnyzzz/TeamCity.Virtual.
No I want to create docker container image based on artifacts (like dockerfile etc)
Here is how similar plugin looks like in Visual Studio Online. You can specify where your dockerfile is and how to build your container image and where to upload it.
An answer?
I think you can install docker and use it from cmd or powershell steps.
If you can build image remotely (not at build agent itself) you only need docker utility not a docker daemon/service.
Yes, you can but this will require for you to provide all the plumbing necessary to make all of it work. As you can see from screenshot above VSO provides it out of the box with no additional coding necessary.
You are right. But docker build and push commands are so simple...
Once you start dealing with authenticated repositories, versioning, custom docker files etc it becomes more complicated to be handling purely in script.
While TeamCity debates wether it's needed feature or not VSTS just released latest update to their offerings with details targeting specifically to container deployment (https://azure.microsoft.com/en-us/blog/visual-studio-team-services-may-2017-digest/)
Built-in tasks for building and deploying container based applications
With this release we have pulled most of the tasks in our Docker extension into the product by default, improved them, and introduced a set of new tasks and templates for making a set of container scenarios easier.
TeamCity 2017.2+ has bundled Docker integration which allows to build docker images for windows and linux containers.