Spaces:
Paused
Paused
| FROM debian:bookworm | |
| LABEL description="Chrome With noVNC" \ | |
| maintainer="admin@fever.ink" \ | |
| version="2.1" | |
| # Install Chrome | |
| RUN \ | |
| apt update && \ | |
| apt upgrade -y && \ | |
| apt install --no-install-recommends -y wget fonts-droid-fallback && \ | |
| wget --no-check-certificate https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable_current_amd64.deb && \ | |
| apt install --no-install-recommends -f -y /tmp/google-chrome-stable_current_amd64.deb && \ | |
| rm /tmp/google-chrome-stable_current_amd64.deb | |
| # Install VNC server and noVNC | |
| RUN \ | |
| apt install --no-install-recommends -y tightvncserver xfonts-base git websockify python3 net-tools procps && \ | |
| git clone https://github.com/novnc/noVNC.git /opt/novnc | |
| # Create directories and set permissions for non-root user | |
| RUN \ | |
| mkdir -p /config/google-chrome /config/.vnc && \ | |
| chmod -R 777 /config /opt/novnc && \ | |
| touch /config/.vnc/passwd /config/.vnc/xstartup && \ | |
| chmod 666 /config/.vnc/passwd /config/.vnc/xstartup | |
| # Copy and configure chrome-novnc.sh | |
| COPY chrome-novnc.sh /usr/bin/chrome-novnc.sh | |
| RUN \ | |
| ln -s /opt/novnc/vnc.html /opt/novnc/index.html && \ | |
| chmod +x /usr/bin/chrome-novnc.sh | |
| # Environment variables | |
| ENV \ | |
| WIDTH=1280 \ | |
| HEIGHT=720 \ | |
| LANGUAGE=zh_CN.UTF-8 \ | |
| VNC_PASSWD=Binhminh12 \ | |
| HOME=/config \ | |
| XDG_CONFIG_HOME=/config \ | |
| VNC_DIR=/config/.vnc | |
| EXPOSE 7860 | |
| VOLUME /config | |
| # Clean up | |
| RUN \ | |
| apt purge -y git && \ | |
| apt autoremove --purge -y && \ | |
| rm -rf /var/lib/apt/lists/* | |
| CMD ["bash", "-c", "/usr/bin/chrome-novnc.sh"] |