This should be a duplicate of this question: Docker look at the log of an exited container. But I cannot get anything in that question to work.
I'm running container with this command (copied from Azure WebApp startup script)
docker run -d -p 5785:80 --name web-bt_0_096c876f -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=web-bt -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=web-bt.azurewebsites.net -e WEBSITE_INSTANCE_ID=5c991bc5716941ff1fb1eb90137ac2f13e1afffea161b14571d6ea1fb1356b3d -e HTTP_LOGGING_ENABLED=1 bt:latest -e environment='Production' -e ASPNETCORE_ENVIRONMENT='Production'
This crashes for some reason (If I replace 'Production' with 'Development' in the two last parameters it works). This is what I'm trying to debug.
Now according to that other thread I should be able to do: docker logs -t web-bt_0_096c876f
but this just returns immediately without printing anything at all.
Why is this empty. This returns nothing even if I replace the startup script with -e environment='Development' -e ASPNETCORE_ENVIRONMENT='Development'
which actually works. I can browse to the web-app. But still no logs at all.
So how do I view the container logs/console output?