Can't run some images

Hi,

Hello,

For some reason I would need to be able to run old versions of Centos (6) under docker installed on Windows 11. I have tried installing several images from DockerHub, even tried to create an image by myself with contrib scripts but the symptom is always the same: the container starts then stops immediately. (e.g. docker run -it centos:6.9 /bin/bash).
I did the test from an Ubuntu Linux and there everything works fine.
I also note that starting from version 7 of a Centos docker image, there are no problems to report.
Is this a limitation due to WSL2 or something like that ?

Thank you for your answers.

CentOS 6 is EoL. It could be a limitation with WSL2, as some older operating systems may not be compatible with the latest version of Docker on Windows 11. Another possibility could be the compatibility of the older CentOS version with the Docker environment on Windows 11.
It’s always a good idea to check the compatibility and requirements of an operating system with the environment it’s being run in before using it.

The response of @ajeetraina already says everything, though I try to add a detail relevant to understand why running images based on old distributions might not work:

WSL2 distributions run on a utility vm shared amongst all distribution. The utility vm uses a recent kernel (5.15.x), which is likely to be incompatible with operating systems where libraries were compiled against older kernels, and as such require an older kernel.

Note: WSL distributions are just containers (but not docker containers) running inside the utility vm.