Run a docker container made for linux on windows

Hi there!

I have a docker image, and i use it to launch a game. I order to perform this, when i run my container on linux, i use this command to pass my display and sound environnement, plus some environnement variable:

docker run -it --rm --device /dev/dri --name $2 -p 1234:1234/udp -e DISPLAY=./display.so -e GAME=./game/so -v /tmp/.X11-unix:/tmp/.X11-unix rtype_server

I wonder how i can achieve the same things but on windows.
can you help me?

Thanks a lot!

I don’t think you can. At least not with Docker Desktop. I know you posted the question in the “community” category, but I moved it to here, since the community category is for asking “about” the community and I guess you are using Docker Desktop on Windows.

Docker Desktop’s virtual machine is just a server and not for audio.

You can create a desktop Linux virtual machine and run Docker in that. You could also try WSL2 directly. Maybe you are already using WSL2 and not Docker Desktop. I have never done it, but I found this for you which might help

It requires installing packages on Windows and also in the virtual machine which you could not do in Docker Desktop’s virtual machine.