-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
67 lines (64 loc) · 2.94 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
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
FROM docker.io/library/debian:bookworm-slim as build_image
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -qq && \
apt-get -y install --no-install-recommends ca-certificates g++ gcc git make pkg-config yasm && \
git clone --single-branch --branch n7.0 --depth=1 https://github.com/FFmpeg/FFmpeg.git /opt/ffmpeg-n7.0
WORKDIR /opt/ffmpeg-n7.0
RUN ./configure \
--prefix="/usr/local/" \
--pkg-config-flags="--static" \
--extra-cflags="-march=native" \
--extra-cflags="-I/usr/local/include" \
--extra-ldflags="-L/usr/local/lib" \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="/usr/local/bin" \
--disable-everything \
--disable-shared \
--disable-doc \
--disable-htmlpages \
--disable-podpages \
--disable-txtpages \
--disable-network \
--disable-autodetect \
--disable-hwaccels \
--disable-ffprobe \
--disable-ffplay \
--enable-bsf=aac_adtstoasc,extract_extradata,h264_metadata,mpeg2_metadata \
--enable-decoder=aac,flac,h264,mjpeg \
--enable-demuxer=aac,eac3,flac,h264,image2,mov,mpegts \
--enable-encoder=aac,flac,h264,mjpeg \
--enable-filter=copy \
--enable-muxer=eac3,flac,h264,mjpeg,mpegts,mp4 \
--enable-parser=aac,h264 \
--enable-protocol=file \
--enable-small \
&& make -j$(nproc) && make install && hash -r
FROM docker.io/library/python:3.12-slim
LABEL org.opencontainers.image.authors="colinho <[email protected]>"
LABEL org.opencontainers.image.description="Waving at the TIDAL music service with Python"
LABEL org.opencontainers.image.documentation="https://github.com/ebb-earl-co/tidal-wave/blob/trunk/README.md"
LABEL org.opencontainers.image.source="https://github.com/ebb-earl-co/tidal-wave"
LABEL org.opencontainers.image.licenses="LGPL-2.1-only"
ENV PIP_DEFAULT_TIMEOUT=100 \
# Allow statements and log messages to immediately appear
PYTHONUNBUFFERED=1 \
# disable a pip version check to reduce run-time & log-spam
PIP_DISABLE_PIP_VERSION_CHECK=1 \
# cache is useless in docker image, so disable to reduce image size
PIP_NO_CACHE_DIR=1
RUN useradd --create-home --shell /bin/bash debian && mkdir -p /home/debian/.local/bin/ && chown -R debian:debian /home/debian/
COPY --from=build_image --chown=debian:debian /usr/local/bin/ffmpeg /home/debian/.local/bin/ffmpeg
USER debian
WORKDIR /home/debian
COPY --chown=debian:debian pyproject.toml .
COPY --chown=debian:debian tidal_wave/ ./tidal_wave/
RUN pip install --user --upgrade pip setuptools wheel dumb-init && \
pip install --user . && \
mkdir -p /home/debian/.config/tidal-wave/ /home/debian/Music/ && \
chown -R debian:debian /home/debian/.config/tidal-wave/ /home/debian/Music/
ENV PATH="/home/debian/.local/bin:$PATH"
VOLUME /home/debian/.config/tidal-wave /home/debian/Music
ENTRYPOINT ["dumb-init", "--", "tidal-wave"]
CMD ["--help"]