-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
117 lines (105 loc) · 4.93 KB
/
Dockerfile
File metadata and controls
117 lines (105 loc) · 4.93 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# ─────────────────────────────────────────────────────────────────────────────
# SortIQ — Docker image with browser-accessible GUI via noVNC
#
# No X11 forwarding required. Access the GUI at:
# http://localhost:6080
#
# Usage:
# docker build -t sortiq .
# docker run -p 6080:6080 -p 8060:8060 -e TMDB_API_KEY=xxx -v ~/Media:/media sortiq
# ─────────────────────────────────────────────────────────────────────────────
FROM python:3.11-slim
LABEL org.opencontainers.image.title="SortIQ"
LABEL org.opencontainers.image.description="Intelligent media sorting and renaming — browser GUI via noVNC"
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
# ── System packages ───────────────────────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
# Virtual framebuffer — provides an in-memory X11 display
xvfb \
# VNC server — exposes the Xvfb display over VNC protocol
x11vnc \
# noVNC + websockify — bridges VNC to WebSocket for browser access
novnc \
websockify \
# ── XCB / X11 libraries required by Qt's xcb platform plugin ──
libx11-6 \
libx11-xcb1 \
libxext6 \
libxi6 \
libxtst6 \
libxcb1 \
libxcb-cursor0 \
libxcb-glx0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-shm0 \
libxcb-sync1 \
libxcb-util1 \
libxcb-xfixes0 \
libxcb-xinerama0 \
libxcb-xkb1 \
libxkbcommon0 \
libxkbcommon-x11-0 \
libgl1 \
libegl1 \
libgles2 \
libfontconfig1 \
libfreetype6 \
fontconfig \
fonts-dejavu-core \
fonts-liberation \
libglib2.0-0 \
libdbus-1-3 \
# ── MediaInfo for technical metadata extraction ────────────────
mediainfo \
# ── Network / TLS ─────────────────────────────────────────────
ca-certificates \
# ── Process management ─────────────────────────────────────────
procps \
&& rm -rf /var/lib/apt/lists/* \
&& fc-cache -fv
# ── Python dependencies ───────────────────────────────────────────────────────
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# ── Application source ────────────────────────────────────────────────────────
COPY core/ ./core/
COPY api/ ./api/
COPY assets/ ./assets/
COPY main.py ./
COPY cli.py ./
COPY config.py ./
# ── Startup script ────────────────────────────────────────────────────────────
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# ── Runtime environment ───────────────────────────────────────────────────────
# Xvfb will start on display :1 — the entrypoint sets DISPLAY before launching Qt
ENV DISPLAY=:1
ENV XVFB_SCREEN=0
ENV XVFB_RESOLUTION=1440x900x24
# Qt platform — xcb talks to the Xvfb virtual framebuffer
ENV QT_QPA_PLATFORM=xcb
ENV QT_X11_NO_MITSHM=1
ENV LIBGL_ALWAYS_SOFTWARE=1
ENV NO_AT_BRIDGE=1
# API keys are NOT set here — pass them at runtime via docker run -e or compose.
# Setting secret values in ENV/ARG triggers Docker's secret scanner and is
# a security anti-pattern. Keys are stored in ~/.sortiq/settings.json instead.
# Example: docker run -e TMDB_API_KEY=your_key ...
ENV API_PORT=8060
ENV API_HOST=0.0.0.0
ENV RUNNING_IN_DOCKER=1
# ── Volumes ───────────────────────────────────────────────────────────────────
VOLUME ["/root/.sortiq"]
VOLUME ["/media"]
# ── noVNC web port ────────────────────────────────────────────────────────────
EXPOSE 6080
EXPOSE 8060
ENTRYPOINT ["/entrypoint.sh"]