Update Dockerfile
Browse files- Dockerfile +19 -14
Dockerfile
CHANGED
|
@@ -1,44 +1,49 @@
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
| 3 |
-
# 1. Install System Tools
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
xfce4 \
|
| 7 |
xfce4-terminal \
|
| 8 |
xvfb \
|
| 9 |
python3 \
|
| 10 |
python3-pip \
|
| 11 |
-
python3-tk \
|
| 12 |
-
python3-dev \
|
| 13 |
scrot \
|
| 14 |
-
|
| 15 |
-
|
|
|
|
| 16 |
xauth \
|
|
|
|
|
|
|
| 17 |
&& apt-get clean
|
| 18 |
|
| 19 |
-
# 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
-
#
|
| 23 |
COPY requirements.txt .
|
| 24 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
-
#
|
| 27 |
ENV DISPLAY=:99
|
| 28 |
ENV XAUTHORITY=/root/.Xauthority
|
| 29 |
|
| 30 |
-
#
|
| 31 |
RUN touch /root/.Xauthority
|
| 32 |
|
| 33 |
-
#
|
| 34 |
COPY . .
|
| 35 |
|
| 36 |
-
#
|
| 37 |
RUN chmod +x start.sh
|
| 38 |
RUN chmod -R 777 /app
|
| 39 |
|
| 40 |
-
#
|
| 41 |
EXPOSE 7860
|
| 42 |
-
|
| 43 |
-
# 9. Start
|
| 44 |
CMD ["/bin/bash", "start.sh"]
|
|
|
|
| 1 |
FROM ubuntu:22.04
|
| 2 |
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
|
| 5 |
+
# 1. Install System & Desktop
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
xfce4 \
|
| 8 |
xfce4-terminal \
|
| 9 |
xvfb \
|
| 10 |
python3 \
|
| 11 |
python3-pip \
|
|
|
|
|
|
|
| 12 |
scrot \
|
| 13 |
+
wget \
|
| 14 |
+
curl \
|
| 15 |
+
gnupg \
|
| 16 |
xauth \
|
| 17 |
+
dbus-x11 \
|
| 18 |
+
x11-utils \
|
| 19 |
&& apt-get clean
|
| 20 |
|
| 21 |
+
# 2. Install Google Chrome (Fixes Snap Error)
|
| 22 |
+
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
| 23 |
+
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
|
| 24 |
+
&& apt-get update && apt-get install -y google-chrome-stable
|
| 25 |
+
|
| 26 |
+
# 3. Setup
|
| 27 |
WORKDIR /app
|
| 28 |
|
| 29 |
+
# 4. Install Python Libs
|
| 30 |
COPY requirements.txt .
|
| 31 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 32 |
|
| 33 |
+
# 5. Env Vars
|
| 34 |
ENV DISPLAY=:99
|
| 35 |
ENV XAUTHORITY=/root/.Xauthority
|
| 36 |
|
| 37 |
+
# 6. Auth Fix
|
| 38 |
RUN touch /root/.Xauthority
|
| 39 |
|
| 40 |
+
# 7. Copy Files
|
| 41 |
COPY . .
|
| 42 |
|
| 43 |
+
# 8. Permissions
|
| 44 |
RUN chmod +x start.sh
|
| 45 |
RUN chmod -R 777 /app
|
| 46 |
|
| 47 |
+
# 9. Port & Start
|
| 48 |
EXPOSE 7860
|
|
|
|
|
|
|
| 49 |
CMD ["/bin/bash", "start.sh"]
|