jrottenberg / ffmpeg

Docker build for FFmpeg on Ubuntu / Alpine / Centos / Scratch / nvidia / vaapi
https://hub.docker.com/r/jrottenberg/ffmpeg/
Apache License 2.0
1.43k stars 462 forks source link

Use ONBUILD for static builds #117

Open trickkiste opened 6 years ago

trickkiste commented 6 years ago

I know license issues are in the way of a static ffmpeg build in Docker.

Nevertheless, I believe there could be a way around this, which still would help people to a static ffmpeg build, by not actually making a binary available in the jrottenberg/ffmpeg image. Instead the image would contain everything necessary to compile the static binary, but postpone the compilation process by using the ONBUILD instruction - ergo the compilation only takes place, once a Dockerfile deriving FROM jrottenberg/ffmpeg is built.

Hence the jrottenberg/ffmpeg Docker image would be legally indisputable, but people could still chose to use an ffmpeg binary in their private images. We delegate the licence problematic to the next of kin.

Having a static binary, with all dependencies compiled in is just so much more convenient for usage in multistage builds. if I am not mistaken, it would also be possible to use this binary in any Docker image independent of the specific Linux distribution in use. A huge win for convenience.

Therefore I would conclude, even if the legality of the downstream Docker image might be questionable, as long as the jrottenberg/ffmpeg image is indisputable, it is worth the trouble.

Looking forward to hearing your opinions on my proposal.

My best regards, Markus

trickkiste commented 6 years ago

Also this would make it trivial for people to add custom libraries or option before ffmpeg compilation.

I for example need to add Blackmagic SDK before compilation. I could therefore simple derive from jrottenberg/ffmpeg, copy in the SDK and add the necessary options and everything would be compiled, once I build my derivative image.

ubivent-seuffert commented 5 years ago

Also this would make it trivial for people to add custom libraries or option before ffmpeg compilation.

I for example need to add Blackmagic SDK before compilation. I could therefore simple derive from jrottenberg/ffmpeg, copy in the SDK and add the necessary options and everything would be compiled, once I build my derivative image.

exactly my usecase! i would love to see an easy option to make static ffmpeg builds