OK, I need to take some of my words, Pipewire works with trouble. But I manage to reproduce with alsa and pulseaudio. Due to Pipewire’s doc is too abstract, I’m only able to produce discontinuous sound, I will talk about it later.
Profile is up there, you need to change it to fit your need.
pulseaudio:
As root.
apt install pulseaudio alsa-utils alsa-tools -y
Use it to find the real sound card:
aplay -l
As you can see, my sound card is card 0:
**** List of PLAYBACK Hardware Devices ****
card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AudioPCI [Ensoniq AudioPCI], device 1: ES1371/2 [ES1371 DAC1]
Subdevices: 1/1
Subdevice #0: subdevice #0
Default volume is 0, use it to tweak:
alsamixer
Notice, this is dummy output, which is useless:

This is the real sound card:

Now you can test sound with:
aplay /usr/share/sounds/alsa/Front_Center.wav
Change to normal user with audio group, and test with above cmd. No sound right, to fix it, change #load-module module-alsa-sinkto load-module module-alsa-sink device=hw:0 in /etc/pulse/default.pa according to https://unix.stackexchange.com/questions/14454/changing-default-audio-device-in-pulseaudio . Remember to change hw:0 to your card. There is sound now.
alsa:
As root:
apt install pipewire-alsa alsa-utils alsa-tools -y
apt purge pipewire -y
apt autoremove -y
Exit container and restart it. Now you can play sound.
pipewire:
As root:
apt install pipewire-audio pulseaudio-utils alsa-utils alsa-tools -y
Change to normal user with audio group, add blew to ~/.config/pipewire/pipewire-pulse.conf.d/custom.conf
pulse.cmd = [{ cmd = “load-module” args = “module-alsa-sink device=hw:0” flags = []}]
Run following cmds:
systemctl --user enable --now pipewire pipewire-pulse wireplumber
systemctl --user daemon-reload
systemctl --user restart pipewire pipewire-pulse wireplumber
Now, use the test cmd, you can hear discontinuous sound. If you know how to config pipewire, please read https://docs.pipewire.org/page_pulse_module_alsa_sink.html , and post how to use module-alsa-sink, thanks in advance.