JetBrains / teamcity-docker-agent

TeamCity agent docker image sources
https://hub.docker.com/r/jetbrains/teamcity-agent/
Apache License 2.0
77 stars 64 forks source link

How get the agent windows container running? #47

Closed xetra11 closed 5 years ago

xetra11 commented 5 years ago

That is what I tried according to the guide on https://hub.docker.com/r/jetbrains/teamcity-agent/

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? I am kinda unsure if I fully understood how the windows agent is started.

I run the container of a debian environment - no windows container

dtretyakov commented 5 years ago

@xetra11, windows containers work only on Windows machines, but according to the logs you're trying to start windows container on *nix machine.

xetra11 commented 5 years ago

Yea that is right! Context:

I have several builds for my projects that are build by maven - so no problem running on nix enviroments. But my new project uses .cmd and windows compiled tools to build. Therefore I need a windows enviroment. So my only option is to have a windows environment to run a windows teamcity and a windows agent on? No hacky way to at let .cmd files etc. being run for that single build step?

dtretyakov commented 5 years ago

AFAIK there is no official support of windows cmd files on Linux, but PowerShell scripts could work on both platforms. So if you could convert your cmd files into ps1 files you'll be able to use them on both platforms.

windows compiled tools to build

If such tools could execute cross-compilation for windows on linux platform you could use them. Otherwise you need to have windows machine: bare metal / cloud or some sort of virtualization on top of your nix machine.

xetra11 commented 5 years ago

Okay thanks for the infos buddy!