-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (53 loc) · 1.69 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
FROM python:3.13-slim AS base
FROM base AS build-ffmpeg
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential wget bzip2 nasm pkg-config libssl-dev
RUN mkdir /build
RUN cd /build && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjf ffmpeg-snapshot.tar.bz2
RUN cd /build/ffmpeg && \
./configure \
--prefix="/build/ffmpeg" \
--extra-cflags="-I/build/ffmpeg/include" \
--extra-ldflags="-L/build/ffmpeg/lib" \
--extra-libs="-lm" \
--ld="g++" \
# Configuration options
--disable-autodetect \
# Enable HTTPS support
--enable-openssl \
# Program options
--disable-ffplay \
--disable-ffprobe \
# Documentation options
--disable-doc \
# Component options
--disable-avdevice \
# Individual component options
--disable-everything \
--enable-protocol=file \
--enable-protocol=http \
--enable-protocol=https \
--enable-decoder=mp3 \
--enable-decoder=pcm_s16le \
--enable-demuxer=mp3 \
--enable-demuxer=wav \
--enable-demuxer=concat \
--enable-encoder=pcm_s16le \
--enable-muxer=wav \
--enable-filter=aresample \
--enable-filter=concat \
&& \
make -j8
FROM base AS runtime
COPY requirements.txt /
RUN pip install --no-cache-dir -r /requirements.txt
COPY --from=build-ffmpeg /build/ffmpeg/ffmpeg /usr/local/bin/
RUN mkdir /app
WORKDIR /app
COPY news_scraper ./news_scraper
COPY fragments ./fragments
ENV PYTHONUNBUFFERED=1
STOPSIGNAL SIGINT
ENTRYPOINT ["python3", "-m", "news_scraper"]