-
Notifications
You must be signed in to change notification settings - Fork 12
Add ffmpeg to fix testcontainers/testcontainers-java#512 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dockerfile
Outdated
|
||
RUN pip install vnc2flv | ||
# INSTALL ffmpeg | ||
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it might be possible to install this via apt, but probably ffmpeg contains non-codecs and is therefore not in Debian package repositories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it seems newer Debian version contain ffmpeg. So this would mean e.g. updating the image to debian:buster-slim
, which sounds fine to me in general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed It was the easiest solution, but I had some difficulties at the beginning to install ffmpeg via apt, as stated in Debian wiki page, it is not available for Debian 8.
...So I thought of two solutions:
- Compile and install it from the source code
- Or Use the available static version, which is mentioned in ffmpeg official download page under Linux Static Builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about upgrading the image to a newer Debian version? I would prefer this approach if it works.I checked and ffmpeg is available in e.g. buster.
Dockerfile
Outdated
|
||
RUN pip install vnc2flv | ||
# INSTALL ffmpeg | ||
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it seems newer Debian version contain ffmpeg. So this would mean e.g. updating the image to debian:buster-slim
, which sounds fine to me in general.
Dockerfile
Outdated
|
||
RUN pip install vnc2flv | ||
# INSTALL ffmpeg | ||
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about upgrading the image to a newer Debian version? I would prefer this approach if it works.I checked and ffmpeg is available in e.g. buster.
Dockerfile
Outdated
RUN apt-get update && \ | ||
apt-get install -y ffmpeg=7:4.1.6-1~deb10u1 && \ | ||
apt-get autoremove && apt-get clean && \ | ||
ffmpeg -version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more thing to change:
Can you please move all those commands to the RUN
command starting line 10?
Line10 should read like this I assume:
RUN apt-get update && apt-get install -y \
python-pip python-dev ffmpeg=7:4.1.6-1~deb10u1 \
&& rm -rf /var/lib/apt/lists/*
&& pip install vnc2flv \
&& rm -fr /tmp/*
This way we have minimal layers.
Is autoremove
and clean
necessary? There should be no useless packages coming in I would have assumed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, it's Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @rnorth can you have a final look?
Thanks! LGTM I will merge and cut a release. |
Thank you for working on this @oussamabadr 🙇♂️ |
You're welcome, thanks to you and to @kiview for following up 👍 |
In order to fix testcontainers/testcontainers-java#512, I added ffmpeg to this docker image.