0

I have this setup

  1. container #1 "web"
  2. container #2 "db"

Now this web container holds my application that uses ffmpeg to record streams. The problem is Im not quite sure where to store my recorded streams and if I should install ffmpeg on the webapplication docker or on the base system. The docker web container containing the app will call ffmpeg true shell script.

What would be the:

  1. Best location to store my application generated data ( recorded streams ) the web container or the base system filesystem?
  2. Would it be possible to call ffmpeg installed on the base file system the docker container runs on and also store the generated recorded files there or is that not a good practice?
Rubytastic
  • 223
  • 1
  • 2
  • 14

1 Answers1

1
  1. It depends on your need. If you want to save (permanently) your recorded stream, they can be saved in an attached volume, which is your host directory. So, when the container is destroyed/recreated, the stream data is persisted in attached volume. Read about docker volume in here.

    If the recorded stream is not used anymore in the furure, you can just put them in the container.

  2. No, it is not a good practice. The philosophy of container is: the container can be moved easily (portable) without need to configure many thing in the host. You may install ffmpeg in your web container. So, in the case you move your container to another host, you only need to install the Docker and run the container there.

Edward Samuel
  • 791
  • 7
  • 9