dockur / windows

Windows inside a Docker container.
MIT License
29.22k stars 1.99k forks source link

sudo docker exec -it container_id won't work!? #757

Closed logicmindyou closed 1 month ago

logicmindyou commented 1 month ago

Operating system

windows 11

Description

Is it possible to run commands to the Windows OS from host terminal?

For me, sudo docker exec -it container_name_or_id cmd nor sudo docker exec -it container_name_or_id powershell work!?

Docker compose

services: windows34: image: dockurr/windows container_name: windows34 environment: VERSION: "win11" DISK_SIZE: "25G" RAM_SIZE: "4G" CPU_CORES: "2" USERNAME: "bill" volumes:

Docker log

docker exec -it test3 powershell "echo Hello World"

OCI runtime exec failed: exec failed: unable to start container process: exec: "powershell": executable file not found in $PATH: unknown

docker exec -it test3 cmd "echo Hello World"

OCI runtime exec failed: exec failed: unable to start container process: exec: "cmd": executable file not found in $PATH: unknown

Screenshots (optional)

No response

kroese commented 1 month ago

No, but you can use RemoteAPP for this, see https://github.com/dockur/windows/issues/412