Build step gets stuck when run inside docker container

I have a build configuration that uses a plugin called Advanced Installer Plugin for TeamCity. So far I have setup a docker compose to run both server and build agent on a windows host. 

The issue is that when I run the build it just gets stuck when the build stept that uses the plugin. There is no further log output beside the step being started and the whole build gets stuck and I am required to restart the whole container. When I run the same build on an agent running directly on the host it completes without issues. Suspecting it might be an issue with the plugin itself I made a post in the dedicated forum but they are unable to replecate my issue.

Here is currently used compose file:

services:
  teamcity-server:
    image: teamcity-server:latest
    user: 'NT Authority\System'
    ports:
      - 8112:8111
      - 1433:1433
    volumes:
      - C:/TeamCity/teamcity-server/data:C:/ProgramData/JetBrains/TeamCity:rw
      - C:/TeamCity/teamcity-server/logs:C:/TeamCity/logs:rw
    mem_limit: 3g
  agent:
    user: 'NT Authority\System'    
    volumes:
      - C:/TeamCity/teamcity-agent/conf:C:/BuildAgent/conf:rw
      - C:/TeamCity/teamcity-agent/system:C:/BuildAgent/system:rw
      - C:/TeamCity/teamcity-agent/work:C:/BuildAgent/work:rw
      - C:/TeamCity/teamcity-agent/output:C:/BuildAgent/output:rw
      - C:/TeamCity/teamcity-agent/plugins:C:/BuildAgent/plugins:rw
    image: jetbrains/teamcity-agent:latest-windowsservercore
    environment:
      - SERVER_URL=http://<server-ip>:8112
      - TEAMCITY_SERVER_MEM_OPTS=-Xmx2g -XX:ReservedCodeCacheSize=350m   

This is the output from the runner inside the docker container:

...
agent-1            | [2026-07-27 13:57:06,937]   INFO - erStages.start.CallRunnerStage - ----------------------------------------- [ Step 'Installer (Advanced Installer)' (AdvancedInstaller), Build "Test / TEst" #12 {id=2701, buildTypeId='Test_TEst'} ] -----------------------------------------

After that there is no more log output and canceling it through the Web-Interface also does nothing.

This is what is outputs when running directly on the host:

...
[2026-07-27 13:18:26,341]   INFO - erStages.start.CallRunnerStage - ----------------------------------------- [ Step 'Installer (Advanced Installer)' (AdvancedInstaller), Build "Test / TEst" #10 {id=2503, buildTypeId='Test_TEst'} ] -----------------------------------------
[2026-07-27 13:18:43,679]   WARN - nt.impl.BuildExceptionsHandler - Failed to execute runner stage: CallRunnerStage. Advanced Installer project file not found. Path: C:\BuildAgent\work\2fe9d9bc204d918f\TestInstaller.aip
[2026-07-27 13:18:43,734]   INFO - ges.RunnerFinishStagesExecutor - Call finish stage jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.PublishStepStatusFStage
[2026-07-27 13:18:43,736]   INFO - ges.RunnerFinishStagesExecutor - Call finish stage jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.UnsubscribePropertiesFileUpdaterRunnedFStage
[2026-07-27 13:18:43,736]   INFO - ges.RunnerFinishStagesExecutor - Call finish stage jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FlushBuildLogRunnerFStage
[2026-07-27 13:18:43,736]   INFO - ges.RunnerFinishStagesExecutor - Call finish stage jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage
[2026-07-27 13:18:43,768]   INFO - ges.RunnerFinishStagesExecutor - Call finish stage jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FlushBuildLogRunnerFStage
[2026-07-27 13:18:43,789]   INFO - .agent.impl.BuildRunActionImpl - Call finish stage jetbrains.buildServer.agent.impl.buildStages.finishStages.FlushBuildLogFStage
[2026-07-27 13:18:43,800]   INFO - .agent.impl.BuildRunActionImpl - Call finish stage jetbrains.buildServer.agent.impl.buildStages.finishStages.FireBeforeBuildFinishFStage
[2026-07-27 13:18:45,746]   INFO -    jetbrains.buildServer.AGENT - Updating agent parameters on the server: AgentDetails{Name='ip_192.168.15.239', AgentId=71, BuildId=2503, AgentOwnAddress='null', AlternativeAddresses=[], Port=9090, Version='222577', PluginsVersion='222577-md5-a08511198b9262223180ac6344546c72', AvailableRunners=[AdvancedInstaller, Ant, cargo-deploy-runner, csharpScript, DockerCommand, dotcover, dotnet, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, jb.nuget.installer, jb.nuget.pack, jb.nuget.publish, jetbrains_powershell, JPS, kotlinScript, Maven2, nodejs-runner, nunit-console, python-runner, Qodana, rake-runner, SBT, simpleRunner, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner], AvailableVcs=[tfs, jetbrains.git, mercurial, svn, perforce], AuthorizationToken='5ac4295fdf64ae140ff93d8e1fef5ddb', PingCode='2dhuixusfsulfs0OKLKOIaklst1mDrqi'}
[2026-07-27 13:18:53,191]   INFO -    jetbrains.buildServer.AGENT - Publishing artifacts process started
...

I know the build described in the logs has failed but the runner does not get stuck like when running in the container. I also tested it with a functioning project and the result was the same.

0
1 comment

Hi,

Thank you for providing the additional information and logs.

From what you've shared, the behavior is consistently different between the Windows host agent and the Windows Server Core container:

  • In the container, the Advanced Installer build step reaches CallRunnerStage and then no further log output is produced. The build also cannot be stopped from the TeamCity UI.
  • On the host agent, although the example build fails because the .aip project file is missing, the runner exits normally and TeamCity proceeds through the remaining build stages without hanging.

Based on the available information, we cannot conclude that the issue is caused by TeamCity itself. At the moment, the issue appears to be isolated to the Advanced Installer build step when running inside a Windows Server Core container.

Since the Advanced Installer TeamCity plugin is a third-party plugin maintained by Advanced Installer rather than JetBrains, I would recommend sharing these findings with the plugin authors as well. The comparison between the host and container behavior suggests this may be a compatibility issue between the plugin (or the underlying Advanced Installer CLI) and the Windows container environment.

From the TeamCity side, we'd still be happy to help investigate further. Could you please provide the following?

  • Your exact TeamCity version (Administration | About TeamCity).
  • The TeamCity agent logs from inside the container (C:\BuildAgent\logs), especially teamcity-agent.log covering the hung build.
  • The Advanced Installer version installed inside the container, and whether it matches the version installed on the host.
  • If possible, try running the same command manually inside the container. If it also hangs outside TeamCity, that would strongly indicate the issue is outside TeamCity itself.
  • If the build is hanging, please also capture three TeamCity agent thread dumps approximately 30 seconds apart. These will help us determine whether the TeamCity agent is internally blocked or simply waiting for the third-party runner to complete.

If you receive any feedback from the Advanced Installer team or collect the additional logs and thread dumps, please feel free to share them with us here.

Files can be uploaded via https://uploads.jetbrains.com/. Please let us know the exact id after the upload.

 

0

Please sign in to leave a comment.