Closed StasClick closed 4 years ago
Interesting to note, if I simply remove line ENV MY_SUPER_VARIABLE="Hello world!"
it will work. I cannot understand it.
You don't need to define the entrypoint. IIS image already defines it. See the example on the first page.
@bariscaglar, yeah, I did it just for testing. But without this line result is the same.
Did you also remove CMD?
I need CMD. No matter what I put here. It is not work. For example:
FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019
ENV MY_SUPER_VARIABLE="Hello world!"
copy start_db.ps1 start_db.ps1
CMD ["powershell.exe", "-file", "start_db.ps1"]
Simply removing ENV solves the issue. But I need both instructions.
Hi. I found why it is not working. The CMD command instead of executing "powershell.exe" it extends argument list of ENTRYPOINT. That's why it stop to work.
So the question is, why CMD do not execute executable file in exec form?
@StasClick I am having the same issue, even when using the docker file coming with https://github.com/microsoft/dotnet-framework-docker.git. Did you have any success finding a solution?
@kejvi-doko Hi. Yes, solved. But already not remember how. I guess it was related to some windows updates, and when I downloaded new image version, the issue disappeared.
In my case the error was fixed by using RUN
instead of CMD
I have a docker file with some variables and CMD instruction. It do not work. Simplified example below.
Docker file:
docker info:
Commands:
Result: