forked from ponchio/untrunc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (64 loc) · 1.38 KB
/
Dockerfile
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
# pull base image
FROM ubuntu:bionic as build
# install packaged dependencies
RUN apt-get update && \
apt-get -y install \
libavformat-dev \
libavcodec-dev \
libavutil-dev \
unzip \
g++ \
wget \
make \
nasm \
zlib1g-dev
# download and extract
WORKDIR /untrunc
RUN wget https://github.com/libav/libav/archive/v12.3.zip && \
unzip v12.3.zip && \
rm v12.3.zip
# build libav
WORKDIR /untrunc/libav-12.3/
RUN ./configure && make -j8
# build untrunc
WORKDIR /untrunc
ADD . .
RUN /usr/bin/g++ -o untrunc \
main.cpp \
atom.cpp \
mp4.cpp \
file.cpp \
track.cpp \
log.cpp \
codec.cpp \
codec_rtp.cpp \
codec_avc1.cpp \
codec_hev1.cpp \
codec_mp4a.cpp \
codec_mp4v.cpp \
codec_pcm.cpp \
codec_mbex.cpp \
codec_alac.cpp \
codecstats.cpp \
codec_unknown.cpp \
codec_text.cpp \
codec_tmcd.cpp \
codec_gpmd.cpp \
codec_camm.cpp \
codec_fdsc.cpp \
codec_apch.cpp \
codec_mijd.cpp \
-I./libav-12.3 \
-L./libav-12.3/libavformat -lavformat \
-L./libav-12.3/libavcodec -lavcodec \
-L./libav-12.3/libavresample -lavresample \
-L./libav-12.3/libavutil -lavutil \
-lpthread -lz
# Have a small deliverable Docker image
FROM ubuntu:bionic
COPY --from=build /untrunc/untrunc /untrunc
# user
RUN useradd untrunc
USER untrunc
# execution
ENTRYPOINT ["/untrunc"]