-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (56 loc) · 1.82 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
FROM ubuntu:latest
#install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip autoconf automake build-essential \
libass-dev libfreetype6-dev libtheora-dev libtool libvorbis-dev libopus-dev libx264-dev libmp3lame-dev pkg-config \
texinfo zlib1g-dev yasm wget && \
rm -rf /var/lib/apt/lists/*
RUN mkdir ~/ffmpeg_sources
#get libfdk-aac
RUN cd /root/ffmpeg_sources && \
wget -O fdk-aac.tar.gz https://github.com/mstorsjo/fdk-aac/tarball/master && \
tar xzvf fdk-aac.tar.gz && \
libtoolize && \
cd mstorsjo-fdk-aac* && \
autoreconf -fiv && \
./configure --prefix="/root/ffmpeg_build" --disable-shared && \
make && \
make install && \
make distclean
#build ffmpeg
RUN cd /root/ffmpeg_sources && \
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="/root/bin:$PATH" PKG_CONFIG_PATH="/root/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="/root/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I/root/ffmpeg_build/include" \
--extra-ldflags="-L/root/ffmpeg_build/lib" \
--bindir="/root/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libx264 \
--enable-nonfree &&\
PATH="/root/bin:$PATH" make && \
make install && \
make distclean && \
hash -r
#add server files
RUN mkdir /server && mkdir /server/.cache && chmod -R 755 /server
WORKDIR /server
ADD ./static static
ADD ./templates templates
ADD ./rmp.py rmp.py
ADD ./requirements.txt reqs.txt
#install server dependencies
RUN pip3 install -r reqs.txt
EXPOSE 25222
VOLUME /server/music
ENV PATH "$PATH:/root/bin"
CMD [ "/usr/bin/python3", "rmp.py", "-p", "25222", "music" ]