By Visbits
I am trying to build a PHP worker that has the ffmpeg binary installed to transcode a video. I have included the ffmpeg composer extension so I can access the library but don’t understand how I can adjust what is installed on my worker container.
In another community post it seemed like your could build your own dockerbuild file and that would get you most of what was needed, but I didn’t really follow how that worked on the app platform.
HALP.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
In DigitalOcean App Platform, you can customize your worker container by creating your own Dockerfile. From there, you can specify to install the ffmpeg binary for video transcoding purposes. When you deploy your application with the App Platform, it will read this Dockerfile to build your worker with the necessary environment.
Below is a simple example of how a Dockerfile installing ffmpeg might look:
FROM php:7.4-fpm
RUN apt-get update && apt-get install -y \
ffmpeg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
You should replace “php:7.4-fpm” with the base image appropriate for your environment. Make sure you also include any necessary commands for installing PHP and the ffmpeg composer extension.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.