xfcxcxcdfdfd commited on
Commit
b4beebe
·
verified ·
1 Parent(s): 652dd67

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +62 -0
Dockerfile ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Ubuntu as a parent image
2
+ FROM ubuntu:20.04
3
+
4
+ # Set environment variables to avoid interactive prompts
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install necessary dependencies
8
+ RUN apt-get update && \
9
+ apt-get install -y \
10
+ wget \
11
+ curl \
12
+ git \
13
+ python3 \
14
+ python3-pip \
15
+ libnss3 \
16
+ libatk-bridge2.0-0 \
17
+ libgtk-3-0 \
18
+ libdbus-1-3 \
19
+ libxtst6 \
20
+ libxss1 \
21
+ libasound2 \
22
+ libgbm1 \
23
+ unzip \
24
+ gnupg2 \
25
+ lsb-release \
26
+ chromium-browser \
27
+ && apt-get clean
28
+
29
+ # Clone the updated repository
30
+ RUN git clone https://github.com/lilpulgoxxx/socialwarriors.git /app/socialwarriors
31
+
32
+ # Set working directory to socialwarriors
33
+ WORKDIR /app/socialwarriors
34
+
35
+ # Create the 'saves' folder and set permissions
36
+ RUN mkdir -p /app/socialwarriors/saves && chmod 777 /app/socialwarriors/saves
37
+
38
+ # Install Python dependencies
39
+ RUN pip3 install -r requirements.txt
40
+
41
+ # Download Flash Player for Linux
42
+ RUN wget https://archive.org/download/flashplayerarchive/pub/flashplayer/installers/archive/fp_32.0.0.371_archive.zip -O /tmp/flashplayer.zip && \
43
+ unzip /tmp/flashplayer.zip -d /tmp && \
44
+ mkdir -p /usr/lib/adobe-flashplugin && \
45
+ mv /tmp/32_0_r0_371/flashplayer32_0r0_371_linuxpep.x86_64.tar.gz /tmp/flashplayer.tar.gz && \
46
+ tar -xvzf /tmp/flashplayer.tar.gz -C /usr/lib/adobe-flashplugin
47
+
48
+ # Set flags for PPAPI Flash
49
+ ENV CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version=32.0.0.371"
50
+
51
+ # Create a script to find and run server.py
52
+ RUN echo '#!/bin/bash \n\
53
+ if [ -f "server.py" ]; then \n\
54
+ echo "Found server.py, running it..."; \n\
55
+ python3 server.py; \n\
56
+ else \n\
57
+ echo "Error: server.py not found."; \n\
58
+ exit 1; \n\
59
+ fi' > /app/socialwarriors/start.sh && chmod +x /app/socialwarriors/start.sh
60
+
61
+ # Set the default command to run the start script
62
+ CMD ["/app/socialwarriors/start.sh"]