Docker Community Forums

Share and learn in the Docker community.

Streaming and saving file locally

Hi, I was looking for ways to stream video to Youtube and came across this guide. I downloaded a docker image linked in the guide and the stream worked fine. However, I wanted to stream and save the video to an SD card on my Raspberry pi simultaneously. To achieve this, I had to make some changes to the image and then build it again. However, when I configure the command to give me two outputs, the stream doesn’t seem to work and I get the following error message:

No such file or directory

I think this problem has something to do with Docker and how it manages containers and files stored inside these containers. I’m very new to Docker so I would appreciate it if you could solve this problem.

Please share the Dockerfile you createed and the exact commands you used to start your container.

Here is the Dockerfile I created:

I used this command for pulling the container image from Docker:

docker pull alexellis2/streaming:17-5-2017

I used the following command to stream to YouTube:

docker run --privileged --name cam -ti alexellis2/streaming:latest xxxx-xxxx-xxxx-xxxx

I used this command to build the image:

        docker build -t alexellis2/streaming .

Regardless wether the commands in your entrypoint work or not, you do not map any volumes into the container… How do you expect the data to be written to your sdcard without a mapped volume or a bind-mount?

docker run --privileged --name cam -ti -v /path/to/sd:/home/pi/streaming alexellis2/streaming:latest xxxx-xxxx-xxxx-xxxx