|
|
FROM python:3.11-slim-bookworm |
|
|
|
|
|
# Set platform |
|
|
ARG |
|
|
ARG |
|
|
|
|
|
# Install |
|
|
RUN |
|
|
wget |
|
|
netcat-traditional |
|
|
gnupg |
|
|
curl |
|
|
unzip |
|
|
xvfb |
|
|
libxss1 |
|
|
libnss3 |
|
|
libnspr4 |
|
|
libasound2 |
|
|
libatk1.0-0 \ |
|
|
libatk-bridge2.0-0 \ |
|
|
libcups2 |
|
|
libdbus-1-3 \ |
|
|
libdrm2 |
|
|
libgbm1 |
|
|
libgtk-3-0 \ |
|
|
libxcomposite1 |
|
|
libxdamage1 |
|
|
libxfixes3 |
|
|
libxrandr2 |
|
|
xdg-utils |
|
|
fonts-liberation |
|
|
fonts-noto-color-emoji |
|
|
fonts-unifont |
|
|
dbus |
|
|
xauth |
|
|
x11vnc |
|
|
tigervnc-tools |
|
|
supervisor |
|
|
net-tools |
|
|
procps |
|
|
git |
|
|
python3-numpy |
|
|
fontconfig |
|
|
fonts-dejavu |
|
|
fonts-dejavu-core |
|
|
fonts-dejavu-extra |
|
|
vim |
|
|
&& rm /var//apt//* |
|
|
|
|
|
# Install noVNC |
|
|
RUN git clone https: |
|
|
&& git clone https: |
|
|
&& ln -s //novnc/ /opt//index.html |
|
|
|
|
|
# Install Node.js using NodeSource PPA |
|
|
RUN mkdir -p //apt/ |
|
|
&& curl ///gpgkey/ | /etc//keyrings/ |
|
|
&& echo | /etc//sources.list.d/ |
|
|
&& apt-get |
|
|
&& apt-get |
|
|
&& rm /var//apt//* |
|
|
|
|
|
# Verify Node.js and npm installation |
|
|
RUN node -v && npm -v && npx -v |
|
|
|
|
|
# Set up working directory |
|
|
WORKDIR / |
|
|
|
|
|
# Copy |
|
|
COPY |
|
|
RUN |
|
|
|
|
|
# Playwright |
|
|
ENV /ms-browsers |
|
|
RUN mkdir -p $PLAYWRIGHT_BROWSERS_PATH |
|
|
|
|
|
# Install Chromium via Playwright without --with-deps |
|
|
RUN PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 playwright install chromium |
|
|
|
|
|
# Copy application code |
|
|
COPY . . |
|
|
|
|
|
# Set up supervisor configuration |
|
|
RUN mkdir -p //log/ |
|
|
COPY /etc//conf.d/ |
|
|
|
|
|
EXPOSE |
|
|
|
|
|
CMD |
|
|
|