Issues
Issues copied to clipboard
Cannot build git sourced image on Windows dynamic worker
Severity
Sev 3
Version
2025.3
Latest Version
I could reproduce the problem in the latest build
What happened?
The Windows dynamic worker image does not have git installed in %PATH%, so it cannot build the container image from a git URL
Reproduction
- Create a Windows (Default) Worker Pool
- Create a deployment step
- Create
Run a scriptstep - Select
Run once on a worker(Worker Pool just created) - Select
Runs inside a container on a worker - Select
Build container from Git URL
- Create
- Run deployment
- Observe failure to build image
Error and Stacktrace
00:31:10 Verbose | docker build --force-rm -t octopus/9bc47ae1-29cb-428c-b943-862a9cc0acac:latest https://github.com/OctopusDeploy/WorkerTools.git#master:ubuntu.22.04
00:31:10 Error | docker : unable to prepare context: unable to find 'git': exec: "git": executable file not found in %PATH%
00:31:10 Error | At C:\Octopus\Tentacle\Work\foIiv9uIkiNcbIQySKFpg\Bootstrap.ps1:58 char:1
00:31:10 Error | + docker build --force-rm -t octopus/9bc47ae1-29cb-428c-b943-862a9cc0ac ...
00:31:10 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00:31:10 Error | + CategoryInfo : NotSpecified: (unable to prepa...found in %PATH%:String) [], RemoteException
00:31:10 Error | + FullyQualifiedErrorId : NativeCommandError
More Information
Workaround
Select Build container from an inline Dockerfile and copy the contents of the Dockerfile in the repository