@Viraj Vaitha Apologies for the late reply. Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
I understand that you are trying to deploy an Azure Functions Python Programming V2 using a Docker Image so that you can install FFPMEG and FFPROBE and leverage that in your application.
- You can leverage the below docker file which uses the base image from our official Azure Functions Python 4.0 image and installs FFMPEG and FFPROBE using the
apt-get
command. It also sets theAzureWebJobsScriptRoot
environment variable and copies the contents of the current directory to/home/site/wwwroot
.
FROM mcr.microsoft.com/azure-functions/python:4-python3.10
WORKDIR /home/site/wwwroot
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
RUN apt-get update && apt-get install -y ffmpeg && apt-get install -y ffprobe
COPY . /home/site/wwwroot
- Build the Docker image using the following command:
docker build -t myfunctionapp .
- Push the Docker image to a container registry, such as Docker Hub or Azure Container Registry. Here is an example command to push the image to Docker Hub:
docker push myusername/myfunctionapp
On a side note: When creating your own containers, you are required to keep the base image of your container updated to the latest supported base image. Supported base images for Azure Functions are language-specific and are found in the Azure Functions base image repos. Hope this helps.