I\'m trying to dockerize a text to speech application for sharing the code with other developers, however the issue I am having right now is the docker container cannot find
It is definitely possible, you need to mount /dev/snd, see how Jess Frazelle launches a Spotify container, from
https://blog.jessfraz.com/post/docker-containers-on-the-desktop/
you will notice
docker run -it \
-v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
-e DISPLAY=unix$DISPLAY \ # pass the display
--device /dev/snd \ # sound
--name spotify \
jess/spotify
or for Chrome, at the end
docker run -it \
--net host \ # may as well YOLO
--cpuset-cpus 0 \ # control the cpu
--memory 512mb \ # max memory it can use
-v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
-e DISPLAY=unix$DISPLAY \ # pass the display
-v $HOME/Downloads:/root/Downloads \ # optional, but nice
-v $HOME/.config/google-chrome/:/data \ # if you want to save state
--device /dev/snd \ # so we have sound
--name chrome \
jess/chrome