Closed MarcoGrimmeissen closed 1 month ago
You have to use the jenkins/inbound-agent:jdk17-nanoserver-ltsc2022
inbound-agent image instead of the agent one, cf https://github.com/jenkinsci/docker-agent/blob/7b32976be8ff33dabfd3652f2e16b55c1a7558db/windows/nanoserver/Dockerfile#L131-L133
The agent image isn't meant to be used as agent except in that case: https://github.com/jenkinsci/docker-agent/blob/master/README_agent.md#usage
Jenkins and plugins versions report
Environment
```text Not necessary for this issue ```What Operating System are you using (both controller, and any agents involved in the problem)?
We are using Kubernetes plugin for Jenkins to run build pods on a RKE2 Cluster with Windows (Server 2022) and Linux (Ubuntu 24.04) nodes. Currently we are testing this setup.
We want to use jenkins/agent:jdk17-nanoserver-ltsc2022 as agent container
TL;DR
Reproduction steps
Or start the container with docker run -it jenkins/agent:jdk17-nanoserver-ltsc2022 . A cmd.exe is started instead of the ps script
Expected Results
${computer.jnlpmac} ${computer.name} are interpreted by the jenkins-agent.ps1 PowerShell script because it is configured as entry point of jenkins/agent:jdk17-nanoserver-ltsc2022
Actual Results
The kubernetes pod is terminated, because the jnlp container fails to start. Reason: cmd.exe is the defined entry point and the default arguments defined in the template make obviosly no sense for cmd.exe
Anything else?
It is caused by a failing copy command in Line 133 of the Dockerfile in windows/nanoserver/.
Are you interested in contributing a fix?
No response