I am experimenting with Execution Containers, when trying to run a simple ls command in a octopusdeploy/worker-tools container I get the following error:
docker : docker: Error response from daemon: the working directory 'C:\OctopusNonProd\Work\20201023164840-96787-10' is invalid, it needs to be an absolute path.
At C:\OctopusNonProd\Work\20201023164840-96787-10\Bootstrap.ps1:51 char:1
+ docker run --rm `
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (docker: Error r... absolute path.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
The remote script failed with exit code 1
When I observe the C:\OctopusNonProd\Work\ directory I can see the working directory showing up and disappearing immediately, and suspect that the error is because its trying to mount a working directory that has been deleted already.
Has anyone else run into this error?
How can I inspect the Bootstrap.ps1 file to debug and investigate?
Does mean there’s an implicit restriction: If you want to run Linux containers you have to use a Linux worker, and similarly for Windows containers? I read through the documentation and don’t recall anything like this being mentioned in the docs.
This is a limitation of containers themselves. A Linux machine can only run Linux containers. However, a Windows machine can run either Linux or Windows containers but not dynamically.
It has to be set to one or the other using the Docker options.
e.g.
Thank you for the clarification, we were initially trying to run a Windows host with docker hosting Linux containers, which led to the error. Would it be possible for the documentation to be updated to reflect that this scenario is not supported?
I’ll have a look at the documentation and address. It may be that I will link to some Docker documentation as this is not an Octopus Limitation but a Docker limitation.
I believe though you are all up and running? Is there anything else we can help you with?