52 lines
1.2 KiB
Docker
52 lines
1.2 KiB
Docker
FROM ubuntu:22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
DISPLAY=:1 \
|
|
VNC_PORT=5900 \
|
|
NOVNC_PORT=6080 \
|
|
BRIDGE_PORT=8765 \
|
|
SCREEN_WIDTH=1920 \
|
|
SCREEN_HEIGHT=1080 \
|
|
SCREEN_DEPTH=24
|
|
|
|
# System packages: Scribus, Xvfb, VNC, noVNC, Python, supervisor
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
scribus \
|
|
xvfb \
|
|
x11vnc \
|
|
novnc \
|
|
websockify \
|
|
supervisor \
|
|
python3 \
|
|
python3-pip \
|
|
fonts-liberation \
|
|
fonts-dejavu \
|
|
wget \
|
|
curl \
|
|
procps \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Python bridge dependencies
|
|
COPY bridge/requirements.txt /opt/bridge/requirements.txt
|
|
RUN pip3 install --no-cache-dir -r /opt/bridge/requirements.txt
|
|
|
|
# Copy bridge server and Scribus runner
|
|
COPY bridge/ /opt/bridge/
|
|
|
|
# Supervisord config
|
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
# Startup script
|
|
COPY startup.sh /opt/startup.sh
|
|
RUN chmod +x /opt/startup.sh
|
|
|
|
# Data directory for design files
|
|
RUN mkdir -p /data/designs
|
|
|
|
EXPOSE ${NOVNC_PORT} ${BRIDGE_PORT}
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
|
CMD curl -sf http://localhost:${BRIDGE_PORT}/health || exit 1
|
|
|
|
ENTRYPOINT ["/opt/startup.sh"]
|