forked from Ircama/epson_print_conf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (39 loc) · 1000 Bytes
/
Copy pathDockerfile
File metadata and controls
49 lines (39 loc) · 1000 Bytes
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
# Use the official Python slim image
FROM python:3.11-slim
USER root
# Install system dependencies including Tkinter, Xvfb, and X11 utilities
RUN apt update && apt install -y \
git \
tk \
tcl \
libx11-6 \
libxrender-dev \
libxext-dev \
libxinerama-dev \
libxi-dev \
libxrandr-dev \
libxcursor-dev \
libxtst-dev \
tk-dev \
xvfb \
x11-apps \
x11vnc \
fluxbox \
procps \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
RUN mkdir ~/.vnc
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
# Copy only requirements first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --break-system-packages --no-cache-dir -r requirements.txt
# Then copy the rest of the app
COPY . .
# Set the DISPLAY environment variable for Xvfb
ENV DISPLAY=:99
# Expose the VNC port
EXPOSE 5990
# Set the entrypoint to automatically run the script
ENTRYPOINT ["bash", "/app/start.sh"]