Skip to content

Instantly share code, notes, and snippets.

@Pythonista7
Created June 14, 2021 07:47
Show Gist options
  • Save Pythonista7/3371a746165bbc9650c85c73d7275d64 to your computer and use it in GitHub Desktop.
Save Pythonista7/3371a746165bbc9650c85c73d7275d64 to your computer and use it in GitHub Desktop.
Dockerfile for ffmpeg4.4
FROM node:14.15.4-slim
WORKDIR /app
# Ensures tzinfo doesn't ask for region info.
ENV DEBIAN_FRONTEND noninteractivesdsd
RUN apt-get update && apt-get install -y wget \
xz-utils \
dumb-init \
xvfb
# Get ffmpeg and ffprobe with static build
RUN wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz \
&& tar xvf ffmpeg-release-amd64-static.tar.xz \
&& cp ffmpeg-4.4-amd64-static/ffmpeg /usr/local/bin/ \
&& cp ffmpeg-4.4-amd64-static/ffprobe /usr/local/bin/ \
&& rm -rf ffmpeg-release-amd64-static.tar.xz \
&& rm -rf ffmpeg-4.4-amd64-static
# Ensure ffmpeg and ffprobe are successfully copied
RUN ffmpeg -version && ffprobe -version
# ## Install app dependencies
COPY package.json /app/
RUN npm install --production
# Add app source
COPY . /app
# Ensure `editly` binary available in container
RUN npm link
ENTRYPOINT ["/usr/bin/dumb-init", "--", "xvfb-run", "--server-args", "-screen 0 1280x1024x24 -ac"]
CMD [ "node", "index.js" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment