简体   繁体   中英

No executable found matching command “dotnet-/../.dll” when running dotnet core docker image in Azure Web App on Linux

1. Background

I'm currently working on the following build/deployment pipeline:

  1. Github ( https://github.com/devedse/DeveMazeGeneratorCore )

  2. Travis Build ( https://travis-ci.org/devedse/DeveMazeGeneratorCore/jobs/196910720 )

    • dotnet restore
    • dotnet build
    • dotnet publish
    • docker create image
    • docker publish image to hub
  3. Docker image hub ( https://hub.docker.com/r/devedse/devemazegeneratorcore/ )
  4. Use Azure Web App on Linux to execute deployment ( http://devemazegeneratorcoredocker.azurewebsites.net/api/mazes/MazePath/512/512 )
    • Azure上的Docker .

2. Problem

Whenever I push something to the Github repository, a build is kicked off and step 1-3 are being executed correctly. However, the website on Azure is unreachable.

I used SCM to browse to the debug console ( https://devemazegeneratorcoredocker.scm.azurewebsites.net/DebugConsole/Default.cshtml (for future reference)) and executed the following commands to find the log files that were generated by Docker:

命令KUDU

and then used the following commands to read them:

cat docker_128_err.log
cat docker_128_out.log

The out log showed the following results (which seem correct):

Login Succeeded
latest: Pulling from devedse/devemazegeneratorcore
5040bd298390: Already exists
fce5728aad85: Already exists
76610ec20bf5: Already exists
51ee4768b31d: Already exists
4dc55ff439a1: Already exists
9cb727c7d7a0: Already exists
2bea08464ad0: Pulling fs layer
2bea08464ad0: Verifying Checksum
2bea08464ad0: Download complete
2bea08464ad0: Pull complete
Digest: sha256:647f3db3daa3330b7eb109a1c604e5bd403c2c7089b3c18c5e9249a9805d3a4d
Status: Downloaded newer image for devedse/devemazegeneratorcore:latest
Login Succeeded
latest: Pulling from devedse/devemazegeneratorcore
Digest: sha256:647f3db3daa3330b7eb109a1c604e5bd403c2c7089b3c18c5e9249a9805d3a4d
Status: Image is up to date for devedse/devemazegeneratorcore:latest

The error log however, shows the following errors:

2017-01-31T13:11:46.757760723Z No executable found matching command "dotnet-/home/DeveMazeGeneratorCoreWebPublish/DeveMazeGeneratorWeb.dll"

The strange thing is, is that whenever I run the image locally, it all works fine: Dockerlocal

docker run -it --rm -p 0.0.0.0:5001:80 devedse/devemazegeneratorcore:latest

Somehow there seems to be a difference in running a Docker image on a Linux machine in Azure, compared to my local Docker installation which runs the Docker images on the default VM that's being installed when you install Docker for Windows.

3. Configuration files used:

.travis.yml: ( https://github.com/devedse/DeveMazeGeneratorCore/blob/master/.travis.yml ) Dockerfile: ( https://github.com/devedse/DeveMazeGeneratorCore/blob/master/Scripts/Docker/Dockerfile )

4. Summary

So summarizing, it seems that running Docker on Azure is being executed in a different manner then when doing this locally. Does anyone have an idea on what this could be/how to solve it?

Again, (just for easy reference), the error:

2017-01-31T13:11:46.757760723Z No executable found matching command "dotnet-/home/DeveMazeGeneratorCoreWebPublish/DeveMazeGeneratorWeb.dll"

Modify your image to put your application bits somewhere other than /home.

/home is where Azure App Service on Linux bind-mounts the persistent site volume, which is a disk that is shared across instances and is persisted between restarts.

You don't have to use it (you may not have any use for it when running your own image), but anything in your image's /home will disappear at runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM