This is a containerd on Ubuntu and Windows Server 2022 Vagrant environment for playing with Linux and Windows containers.
For Docker on Windows Server 2022 see the rgl/docker-windows-2022-vagrant repository.
Install the Base Ubuntu 22.04 Box.
Install the Base Windows Server 2022 Box.
Install the required plugins:
vagrant plugin install vagrant-reload
Then launch the environment:
vagrant up --provider=libvirt --no-destroy-on-error --no-tty
Enter the windows
virtual machine:
vagrant ssh windows
Test executing a nanoserver
container with ctr
:
ctr image pull mcr.microsoft.com/windows/nanoserver:ltsc2022
ctr run --cni --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 test cmd /c ver
ctr run --cni --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 test cmd /c set
ctr run --cni --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 test ipconfig /all
ctr run --cni --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 test curl https://httpbin.org/user-agent
Test executing a multi-platform image container with ctr
:
ctr image pull docker.io/ruilopes/example-docker-buildx-go:v1.12.0
ctr run --cni --rm docker.io/ruilopes/example-docker-buildx-go:v1.12.0 test
Test executing a nanoserver container with nerdctl
:
nerdctl run --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c ver
nerdctl run --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c set
nerdctl run --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c ipconfig /all
nerdctl run --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c curl https://httpbin.org/user-agent
Test executing a multi-platform image container with nerdctl
:
nerdctl run --rm ruilopes/example-docker-buildx-go:v1.12.0
List this repository dependencies (and which have newer versions):
export GITHUB_COM_TOKEN='YOUR_GITHUB_PERSONAL_TOKEN'
./renovate.sh
- There is no support for building Windows containers because
buildkitd
is not available for Windows. - See all the known Windows issues at https://github.com/containerd/nerdctl/labels/platform%2FWindows.
- See the Microsoft Troubleshooting guide and the CleanupContainerHostNetworking page.