Can Bamboo control windows server containers?
Asked by Onno Filippo:

I can see in the documentation that bamboo can control Docker containers. I'm wondering is this is also true for windows server containers.

We're not using Bamboo yet, but I need to know in order to assess the suitability of Bamboo for our purposes.


Answers:
author: Gabriel Ribeiro
body: Hi Onno,

It depends on what exactly you need to do, Bamboo does not have any specific functionality to control windows server containers but, as you have access to Powershell during the build, you can automate almost any task using a PS script.

Would you mind to share a little bit more info about your use case?

Thank you.

best,  
Gabriel Ribeiro

comments: author: Onno Filippo
body: Hello Gabriel,

We'r looking to introduce CI/CD practices to the development team at my organisation.

We have a mixed environment of windows based and linux based software services, which we'd like to test and deploy using CI and CD.

I'm looking into automating this as much as possible. Containerisation of the services in order to ease deployment without the need for error prone deployment scripts with a lot of customisation could provide this. As we also need IIS and related software, so Windows Server Containers seem to be a requirement for the windows side of things. We're migrating to windows server 2016, so WSC is already something which we could start doing if we'd like to.

I noticed that Bamboo has a specific docker task, if I understand you correctly this can be emulated though PS?

Thanks.

Best regards,

Onno


author: Gabriel Ribeiro
body: Hi Onno,

Thank you for sharing the details about your environment, I'm sure Bamboo can help you to automate it

Actually, you can use the docker task on a Windows Bamboo server, the only requirement is to have the [Docker](https://docs.docker.com/docker-for-windows/) running on this machine.

You can find more details about this in the [Configuring the Docker task in Bamboo](https://confluence.atlassian.com/bamboo/configuring-the-docker-task-in-bamboo-720411254.html) documentation.

I mentioned the PS script before because technically, everything you can do directly from the command line, you can automate using Bamboo.

I suggest you get an evaluation license and implement Bamboo in your environment, each environment has its own challenges so the most reliable way to validate the tool is testing it. if you have any question during the installation and configuration, feel free to reach us at <https://support.atlassian.com/contact/>, we'll be happy to assist you.

Thank you.

best,  
Gabriel Ribeiro


author: Steffen Opel _Utoolity_
body: Just using a PowerShell based [Script task](https://confluence.atlassian.com/bamboo/script-289277046.html) as [suggested](https://community.atlassian.com/t5/Bamboo-questions/Re-Can-Bamboo-control-windows-server-containers/qaq-p/782763/comment-id/18548#M18548) by [@Gabriel Ribeiro](/t5/user/viewprofilepage/user-id/352687) (+1) certainly provides the most flexibility in terms of custom solutions and should also allow you to work around eventual Windows related limitations with the built-in Bamboo Docker support, which seem to be the initial context of your question, so to slightly expand on those:  

The dedicated [Bamboo Docker task](https://confluence.atlassian.com/bamboo/configuring-the-docker-task-in-bamboo-720411254.html) uses the official docker binary under the hood, so my expectation is that it should simply work out of the box on a Windows Server based agent where the Windows container feature is enabled (haven't yet tried this though).

Similarly, I would strongly assume that the new [Bamboo Docker runner](https://confluence.atlassian.com/bamboo/docker-runner-946020207.html) introduced in release 6.4 also just uses the official docker binary under the hood and should likewise work out of the box on an agent where the Windows container feature is enabled (haven't yet confirmed this though).  

Good luck!