-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
74 lines (56 loc) · 2.51 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Heavily inspired by https://github.com/mltframework/mlt/blob/master/Dockerfile
ARG BALENA_ARCH=%%BALENA_ARCH%%
FROM balenalib/$BALENA_ARCH-ubuntu-node:latest AS base
ENV HOME /tmp
RUN install_packages apt-utils
FROM base AS build
# Install packages for building
RUN install_packages wget git automake autoconf libtool intltool g++ yasm nasm \
swig libgavl-dev libsamplerate0-dev libxml2-dev ladspa-sdk libjack-dev \
libsox-dev libsdl2-dev libgtk2.0-dev libsoup2.4-dev \
qt5-default libqt5webkit5-dev libqt5svg5-dev \
libexif-dev libtheora-dev libvorbis-dev python3-dev cmake xutils-dev \
libegl1-mesa-dev libeigen3-dev libfftw3-dev libvdpau-dev meson ninja-build
RUN install_packages build-essential
#wget --quiet -O /tmp/build-melt.sh https://raw.githubusercontent.com/mltframework/mlt-scripts/master/build/build-melt.sh
COPY ./build-melt.sh /tmp/build-melt.sh
# Get and run the build script
RUN echo "INSTALL_DIR=\"/usr/local\"" > /tmp/build-melt.conf && \
echo "SOURCE_DIR=\"/tmp/melt\"" >> /tmp/build-melt.conf && \
echo "AUTO_APPEND_DATE=0" >> /tmp/build-melt.conf && \
echo "FFMPEG_HEAD=0" >> /tmp/build-melt.conf && \
echo "FFMPEG_REVISION=origin/release/5.0" >> /tmp/build-melt.conf && \
bash /tmp/build-melt.sh -c /tmp/build-melt.conf
FROM base
# Install packages for running
RUN install_packages dumb-init \
libsamplerate0 libxml2 libjack0 \
libsdl2-2.0-0 libgtk2.0-0 libsoup2.4-1 \
libqt5core5a libqt5gui5 libqt5opengl5 libqt5svg5 libqt5widgets5 \
libqt5x11extras5 libqt5xml5 libqt5webkit5 \
libtheora0 libvorbis0a python3 \
libegl1-mesa libfftw3-3 libvdpau1 \
git git-lfs \
rename \
# Additional runtime libs \
libgavl1 libsox3 libexif12 xvfb libxkbcommon-x11-0 libhyphen0 libwebp6 \
# LADSPA plugins \
amb-plugins ambdec autotalent blepvco blop bs2b-ladspa caps cmt \
csladspa fil-plugins guitarix-ladspa invada-studio-plugins-ladspa mcp-plugins \
omins rev-plugins ste-plugins swh-plugins tap-plugins vco-plugins wah-plugins \
lsp-plugins-ladspa dpf-plugins-ladspa \
# Fonts \
fonts-liberation 'ttf-.+'
# add libvorbis
RUN install_packages libvorbis-dev
# Install the MLT
COPY --from=build /usr/local/ /usr/local/
RUN npm i -g zx
WORKDIR /usr/src
COPY . /usr/src/
RUN chmod +x /usr/src/tools/*
ENV LD_LIBRARY_PATH /usr/local/lib
# Qt, Movit, and WebVfx require xvfb-run, which requires a PID 1 init provided by dumb-init
# ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/bin/xvfb-run", "-a", "/usr/local/bin/melt"]
# ENTRYPOINT ["balena-idle"]
CMD [ "/bin/bash", "/usr/src/start.sh" ]