Environment window11 with docker

I want to use the docker to create windows system and install some library on it.

Is there any example or tourtoial?

FROM window11

RUN XXX(command with windows)
RUN XXX(command with powershell)

Docker is not for running Windows 11 as a container. You can run containers based on a server image. You can search for “Windows container getting started” and find this:

If you want to run an isolated Windows 11, there is a sandbox feature.

Thanks for your reply.
mcr.microsoft.com/windows/nanoserver:ltsc2022 the image is for the windows system?
So I can deploy some app on it ?

That is one of the Windows images yes. You can install command line apps, but not anything that requires GUI.


& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon

# reboot

Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V","Containers") -All
docker pull mcr.microsoft.com/windows/nanoserver:ltsc2022
docker run -it mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd.exe