2

I have a basic Dockerfile as follows:

FROM ubuntu:16.04

RUN apt-get update \
        && apt-get install -y pulseaudio alsa-utils alsa-base ffmpeg 

On my host, I am able to record an audio file as follows:

ffmpeg -f pulse -i default -f wav out.wav

I would like to do the same inside the docker container.

How do I go about this?

Thanks!

abhinavkulkarni
  • 2,284
  • 4
  • 36
  • 54
  • A design goal of Docker is to isolate containers from details of the host physical devices; you can't do this without some involved setup. If you need to access host devices like this, Docker makes it significantly harder. Is there a specific reason you want to use Docker for this? – David Maze May 13 '20 at 21:25
  • @DavidMaze: I have a containerized application that uses custom C++ libraries that aren't installed on my host yet. If there is any other way to get access to audio stream from the microphones, I would appreciate a reply. Thanks. – abhinavkulkarni May 13 '20 at 21:35

0 Answers0