Running CMS OpenData containers in WSL2

The CMS OpenData containers (or other containers based on CentOS6 or older) exit without doing anything in WSL2 when you run e.g.

docker run --name opendata -it cmsopendata/cmssw_5_3_32 /bin/bash

If you run docker events in another terminal at the same time, you can observe that it dies with exit=139 (seg. fault).

This is solved by adding a new file .wslconfig with

kernelCommandLine = vsyscall=emulate

in \Users[username] (without extension), shutting down with wsl --shutdown and restarting again.

Test that the settings are properly passed with

docker run -ti ubuntu cat /proc/cmdline      

The output should contain vsyscall=emulate , e.g.:

initrd=\initrd.img panic=-1 pty.legacy_count=0 nr_cpus=4 vsyscall=emulate