Alvin3y1 commited on
Commit
982ea46
·
verified ·
1 Parent(s): 7138d3a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +55 -0
Dockerfile ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim-bullseye
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+
5
+ # Install TigerVNC, Window Manager, and dependencies
6
+ # tigervnc-standalone-server provides 'Xvnc'
7
+ RUN apt-get update && apt-get install -y \
8
+ tigervnc-standalone-server \
9
+ tigervnc-common \
10
+ matchbox-window-manager \
11
+ x11-xserver-utils \
12
+ x11-utils \
13
+ wget \
14
+ curl \
15
+ gnupg \
16
+ procps \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Install Chrome
20
+ RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
21
+ apt-get update && \
22
+ apt-get install -y ./google-chrome-stable_current_amd64.deb && \
23
+ rm google-chrome-stable_current_amd64.deb && \
24
+ rm -rf /var/lib/apt/lists/*
25
+
26
+ RUN mv /usr/bin/google-chrome /usr/bin/google-chrome-orig && \
27
+ echo '#!/bin/bash\n/usr/bin/google-chrome-orig --no-sandbox --start-maximized --no-first-run --no-default-browser-check "$@"' > /usr/bin/google-chrome && \
28
+ chmod +x /usr/bin/google-chrome
29
+
30
+ # Install Antigravity App
31
+ RUN mkdir -p /etc/apt/keyrings && \
32
+ curl -fsSL https://us-central1-apt.pkg.dev/doc/repo-signing-key.gpg | gpg --dearmor --yes -o /etc/apt/keyrings/antigravity-repo-key.gpg && \
33
+ echo "deb [signed-by=/etc/apt/keyrings/antigravity-repo-key.gpg] https://us-central1-apt.pkg.dev/projects/antigravity-auto-updater-dev/ antigravity-debian main" | tee /etc/apt/sources.list.d/antigravity.list > /dev/null && \
34
+ apt-get update && \
35
+ apt-get install -y antigravity && \
36
+ rm -rf /var/lib/apt/lists/*
37
+
38
+ RUN useradd -m -u 1000 user
39
+ USER user
40
+ ENV HOME=/home/user \
41
+ PATH=/home/user/.local/bin:$PATH
42
+ WORKDIR $HOME/app
43
+
44
+ COPY --chown=user:user requirements.txt .
45
+ RUN pip install --no-cache-dir --upgrade pip && \
46
+ pip install --no-cache-dir -r requirements.txt
47
+
48
+ COPY --chown=user:user app.py .
49
+
50
+ ENV DISPLAY=:99 \
51
+ RESOLUTION=1280x720
52
+
53
+ EXPOSE 7860
54
+
55
+ CMD ["python", "app.py"]