2

I'm struggling to run a container using dockerode. I have the following command which runs perfectly when entered at the command line

docker run -it --rm --device /dev/vchiq:/dev/vchiq -v /media/storage:/storage video -o hdmi -p storage/tr01/TR01.mp4

but when I run for inside dockerode it exits immediately without errors. I have tried a few variations as follows

First attempt...

docker.run(
    'video',
    ['-it --rm --device /dev/vchiq:/dev/vchiq -v /media/storage:/storage video -o hdmi -p storage/tr01/TR01.mp4'],
    process.stdout, 
    {}, 
    function (err, data, container) {}
);

... and second attempt ...

docker.run(
    'video',
    ['-it --rm --device /dev/vchiq:/dev/vchiq video -o hdmi -p storage/tr01/TR01.mp4'],
    process.stdout, 
    {
          "Binds" : ["/media/storage:/storage"],
          "Privileged" : true                
    }, 
    function (err, data, container) {}
);

Can anybody please advise?

Many thanks

prime
  • 2,004
  • 3
  • 28
  • 45

0 Answers0