JACK server inside container

I am unable to run JACK server inside my container. Am using a host of containers with ROS and some custom ros packages to control a robot. One of the containers needs to play audio through the sound_play package of ROS. It returns the error:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

I am able to play the audio (.wav) files from the container using aplay. sound cards are definitely recognized. have also tried to run the container with privileged mode. Have tried installing jackd in my container and starting a jack server separately, however get the error message:

JACK server starting in realtime mode with priority 10
Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Bus error (core dumped)

Need help here!

Any luck? i’m trying to ffmpeg from inside docker to jack server running on the machine