2ch commited on
Commit
aeaccf1
·
verified ·
1 Parent(s): 30b8836

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -48
Dockerfile CHANGED
@@ -1,49 +1,3 @@
1
- FROM debian:stable-slim
2
- COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
3
- ENV PATH="/app/.venv/bin:$PATH"
4
- WORKDIR /app
5
- RUN echo "deb http://deb.debian.org/debian trixie contrib" >> /etc/apt/sources.list.d/contrib.list && \
6
- echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections && \
7
- apt-get update && apt-get install -y --no-install-recommends \
8
- curl git ca-certificates \
9
- libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
10
- libdbus-1-3 libdrm2 libxkbcommon0 libatspi2.0-0 libxcomposite1 \
11
- libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \
12
- libcairo2 libasound2 libx11-xcb1 libfontconfig1 libx11-6 \
13
- libxcb1 libxext6 libxshmfence1 \
14
- libglib2.0-0 libgtk-3-0 libpangocairo-1.0-0 libcairo-gobject2 \
15
- libgdk-pixbuf-2.0-0 libxss1 libxtst6 fonts-liberation \
16
- fonts-noto-color-emoji fonts-unifont fonts-freefont-ttf \
17
- fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf \
18
- libgl1-mesa-dri libegl-mesa0 xvfb xdotool \
19
- procps wget ca-certificates xclip ffmpeg unzip privoxy ttf-mscorefonts-installer && \
20
- curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
21
- apt-get install -y --no-install-recommends nodejs && \
22
- uv venv --python 3.14 && uv pip install pip && ln -s /app/.venv/bin/* /usr/local/bin/ && \
23
- pip install --no-cache-dir playwright && playwright install-deps chromium 2>/dev/null || true && pip uninstall -y playwright && \
24
- pip install cloakbrowser[serve,geoip] && \
25
- python -c "from cloakbrowser import ensure_binary; ensure_binary()" && \
26
- rm -f ~/.cloakbrowser/.welcome_shown && \
27
- curl -L https://raw.githubusercontent.com/CloakHQ/CloakBrowser/refs/heads/main/bin/cloakserve -o /app/.venv/bin/cloakserve && \
28
- chmod +x /app/.venv/bin/cloakserve && fc-cache -f && rm -rf /var/lib/apt/lists/* /root/.cache/*
29
-
30
- COPY <<-"EOF" /app/resolv.conf
31
- nameserver 1.1.1.1
32
- nameserver 1.0.0.1
33
- nameserver 2606:4700:4700::1111
34
- nameserver 2606:4700:4700::1002
35
- EOF
36
 
37
- COPY --chmod=755 <<-"EOF" /app/start.sh
38
- #!/bin/bash
39
- cat /app/resolv.conf > /etc/resolv.conf
40
- touch /.dockerenv
41
- Xvfb :99 -screen 0 1920x1080x24 -nolisten tcp &
42
- sleep 1
43
- echo -e "starting chromium cdp server...\n connect:\nwith sync_playwright() as p:\n browser = p.chromium.connect_over_cdp('https://username-spacename.hf.space')"
44
- exec /app/.venv/bin/cloakserve --port=7860 > /dev/null 2>&1
45
- EOF
46
-
47
- ENV DISPLAY=:99
48
-
49
- CMD ["/bin/bash", "/app/start.sh"]
 
1
+ FROM docker pull ghcr.io/prolapser/hf-docker/cdp:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ # nothing