我有一个部署到我的 OpenFaaS 的 ffmpeg Dockerfile 函数:
FROM ghcr.io/openfaas/classic-watchdog:0.1.5 as watchdog
FROM jrottenberg/ffmpeg:4.1-alpine
RUN mkdir -p /home/app
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
# Add non root user
RUN addgroup -S app && adduser app -S -G app
RUN chown app /home/app
WORKDIR /home/app
USER app
# Populate example here - i.e. "cat", "sha512sum" or "node index.js"
ENV fprocess="ffmpeg"
# Set to true to see request in function logs
ENV write_debug="false"
EXPOSE 8080
HEALTHCHECK --interval=3s CMD [ -e /tmp/.lock ] || exit 1
CMD ["fwatchdog"]
但我无法弄清楚如何将文件流式传输到函数并提供参数,以便 ffmpeg 知道文件和参数。我对 OpenFaaS 还很陌生,也许这很简单,但我无法理解它。
任何帮助将非常感激。