Closed MichaelSimons closed 6 years ago
Changes look fine, however it looks like the Linux build is failing.
$ /bin/bash -c "docker run --add-host dockerhost:$(ifconfig eth0 | grep -oP 'inet addr:\K\S+') -v /var/run/docker.sock:/var/run/docker.sock testrunner powershell -File ./test/test.ps1 -Folder $folder_filter -HostIP dockerhost"
container_linux.go:247: starting container process caused "exec: \"powershell\": executable file not found in $PATH"
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"powershell\": executable file not found in $PATH".
It's probably unrelated to your change, but any ideas what might be different?
Last night's official build failed with the same issue. I noticed the Dockerfile is pretty old and doesn't specify an explicit version of PS. It is using an extremely old version of Docker. Before spending too much time, it may be best to upgrade to https://github.com/dotnet/dotnet-docker/blob/master/test/Dockerfile.linux.testrunner
@Ravimeda was going to take a look at this. Ravi, please respond here with your findings.
Related to this, perhaps? https://www.traviscistatus.com/incidents/v4jnp6nkgzqx
In dotnet-docker https://github.com/aspnet/aspnet-docker/blob/master/test/Dockerfile.testrunner.linux#L2-L3
docker build -t testrunner -f ./test/Dockerfile.testrunner.linux .
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock testrunner powershell -File test/test.ps1
Succeeds (no errors).
Whereas, aspnet https://github.com/dotnet/dotnet-docker/blob/master/test/Dockerfile.linux.testrunner#L2-L3
docker build -t testrunner -f ./test/Dockerfile.linux.testrunner .
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock testrunner powershell -File build-and-test.ps1 -UseImageCache
Fails -
docker : container_linux.go:265: starting container process caused "exec: \"powershell\": executable file not found in $PATH"
At line:1 char:1
+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock testrunn ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (container_linux...found in $PATH":String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "exec: \"powershell\": executable file not found in $PATH".
Running the following commands in aspnet -
Results in bash: powershell: command not found
Not sure why PowerShell in unavailable, though the log from build command says -
https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 powershell amd64 6.0.0-beta.9-1.ubuntu.16.04 [54.0 MB]
This version is newer than the one used in dotnet-docker v6.0.0-beta.6
(https://github.com/dotnet/dotnet-docker/blob/master/test/Dockerfile.linux.testrunner#L29)
PowerShell is now pwsh as per https://github.com/PowerShell/PowerShell/releases/tag/v6.0.0-beta.9
Starting from this release, the PowerShell Core executable is renamed to be pwsh
Retry the checks after merging https://github.com/aspnet/aspnet-docker/pull/320
Fixes #318
cc @richlander