aspnet / aspnet-docker

[Archived] ASP.NET Core Docker images for 1.x. Go to https://github.com/dotnet/dotnet-docker for 2.1 and up.
https://asp.net
719 stars 171 forks source link

Add <major>-<minor> non-manifest tags #319

Closed MichaelSimons closed 6 years ago

MichaelSimons commented 6 years ago

Fixes #318

cc @richlander

natemcmaster commented 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?

MichaelSimons commented 6 years ago

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

MichaelSimons commented 6 years ago

@Ravimeda was going to take a look at this. Ravi, please respond here with your findings.

natemcmaster commented 6 years ago

Related to this, perhaps? https://www.traviscistatus.com/incidents/v4jnp6nkgzqx

ravimeda commented 6 years ago

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".
ravimeda commented 6 years ago

Running the following commands in aspnet -

  1. docker build -t testrunner -f ./test/Dockerfile.testrunner.linux .
  2. docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock testrunner
  3. powershell

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)

ravimeda commented 6 years ago

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

ravimeda commented 6 years ago

Retry the checks after merging https://github.com/aspnet/aspnet-docker/pull/320