After starting a Windows docker container (base image mcr.microsoft.com/windows/servercore:ltsc2019) on a Windows Server 2019 Datacenter host i cannot start a powershell inside it.
If i create an image from a Dockerfile like this:
FROM mcr.microsoft.com/windows/servercore:ltsc2019
WORKDIR /
WORKDIR /config
ADD /config/run.ps1 /config/run.ps1
CMD ["powershell", "./run.ps1"]
And try to run with docker run -d -it my-image-name
i can see the error code 3221225781
in event log.
If i run docker run -it my-image-name powershell
i get the error failed to resize tty, using default size
and then nothing happens.
If i run docker run -it my-image-name cmd.exe
i can enter the container but running powershell
inside does nothing (no error message or any output).
I tried disabling antivirus and installing VC++ redistributables on the host but no change.
The same image is working fine for other customers on Windows Server 2019 hosts (not datacenter).
Is there any solution or any additional way for me to try and debug the problem? Could the datacenter edition be a problem?
3
Answers
Finally figured out the problem: Kaspersky.
As stated in the question i tried deactivating it but that didn't make a difference. What worked was completely uninstalling Kaspersky..
If I understood docker correctly on windows, the paths should also be windows
I’m assuming that run.ps1 is in your /config folder in your build context? If so, you’re defining /config as your working directory. If you want to copy the script into there just use the current directory. is relative to your working directory if you use a relative path. All subsequent commands will use the working directory as your base path.