Trying to run simple webapi application on docker (deployed to Ubuntu Linux) i face strange exception when attempting to run container:
Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web.
What ive done so far.. I have uploaded my aspnet5 solution to Linux machine and run to publish it: dnu publish --framework dnxcore50 --configuration Release --wwwroot "wwwroot" --wwwroot-out "wwwroot" --iis-command "web"
Next ive done docker build to create an image and then try to run it with: sudo docker run -t -d -p 8000:8000 myimagename
Looking at the docker logs i see an exception shown above.
Ive logged into the container to see folders structure and all look good. Verifyid dnx in container and the one i used to build solution are the same.
Using latest available microsoft/aspnet image - rc1-update1
Any ideas??
Managed to make it running by:
1. I have removed ENTRYPOINT from my Dockerfile to be able to run container.
2. I have connected to the container with "sudo docker exec -t -i mycontainer /bin/bash"
3. Then i did "dnu restore" inside the image
4. I was able to run a command with "dnx web"
So, it looks like the problem is with the binaries versions difference. How is this possible? How can i avoid this issue?