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:
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.