title: Record Sound on Ubuntu Docker Image
body: <p>I would like record audio with <code>ffmpeg</code> when I <a href="https://trac.ffmpeg.org/wiki/Capture/Desktop" rel="noreferrer">capture my screen</a>. The error I'm getting when using <code>alsa</code> is that is that my image does not have a sound card <code>-f alsa -ac 2 -i hw:0</code></p>
  
  <p><strong>Here is how to reproduce on a fresh version of Ubuntu</strong></p>
  
  <p>Start a session in a new ubuntu docker image.</p>
  
  <pre><code>docker pull ubuntu
  docker run -it --rm ubuntu
  </code></pre>
  
  <p>Setup alsa (Advanced Linux Sound Architecture)</p>
  
  <pre><code>apt-get update
  apt-get install alsa-utils
  </code></pre>
  
  <p>List the sound cards</p>
  
  <pre><code>aplay -l
  # aplay: device_list:268: no soundcards found...
  </code></pre>
  
  <p>And playing this sound will fail because this image doesn't have any sound cards</p>
  
  <pre><code>sudo aplay /usr/share/sounds/alsa/Front_Center.wav
  </code></pre>