How to have a teamcity agent to run a windows environment

I am running a teamcity instance in a docker container on linux. I also have an agent running with the same conditions. Now I have a VCS repo that actually has windows .cmd batch files to build and uses windows tools.

I now want to run those tools but I could not figure out how to do that with the Command Line build step. I then tried Powershell but realized my Agent does not have the requirements to run this step. Well fair enought that agent is running on linux.

So then I saw this: https://hub.docker.com/r/jetbrains/teamcity-agent/ and thought there is an image to have an agent running on a isolated windows environment. Unfortunately I was not able to get that windows container running.

 

I used this to start the container since the guide tells me to use a docker image tag for that... but it did not worked

docker run -itd --name teamcity-win-agent -e SERVER_URL="<IP>:80" -v/etc/teamcity/agent_win/conf:/data/teamcity_agent/conf jetbrains/teamcity-agent:windowsservercore

the errors were:

Unable to find image 'jetbrains/teamcity-agent:windowsservercore' locally
docker: Error response from daemon: manifest for jetbrains/teamcity-agent:windowsservercore not found.


Can anybody tell me how to get this done?
0
1 comment

Hi,

 

If I'm understanding your message properly, you would like to run the windows image on top of a linux host. I'm afraid this isn't possible at the moment. This isn't a teamcity limitation, but a docker limitation on itself. You can create a virtual machine, or run it on a windows machine, which does allow to run both linux and windows images via docker for windows.

0

Please sign in to leave a comment.