Closed chadmyers closed 8 months ago
UPDATE: OK, this is because I was using docker run
wrong. You must pass the image name last. Any arguments after the image name are passed into the entrypoint which was tripping up whatever the base image was doing with cmd-line parameters.
The error message could be more helpful, but I don't consider this a bug with the container image, this was me using docker wrong. Closing. Hopefully this will help others who encounter the same problem.
Describe the Bug
When running with a port binding (8080 -> 80 on container port), the container immediately fails with error:
Steps to Reproduce
docker run mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022 -p 8080:80
Other Information
I'm running this on a Windows 11 laptop with Docker Desktop 4.27.1 (136059). It consistently happens every time I try it.
If I leave off
-p 8080:80
, it doesn't die immediately but then it gets a random port.Also, curiously, if I attempt to pass in any environment variable (i.e.
--env FOO=bar
) it'll give me the same error.Output of
docker version
Output of
docker info