# Use an official Ubuntu as a parent image FROM ubuntu:20.04 # Set environment variables to avoid interactive prompts ENV DEBIAN_FRONTEND=noninteractive # Install necessary dependencies RUN apt-get update && \ apt-get install -y \ wget \ curl \ git \ python3 \ python3-pip \ libnss3 \ libatk-bridge2.0-0 \ libgtk-3-0 \ libdbus-1-3 \ libxtst6 \ libxss1 \ libasound2 \ libgbm1 \ unzip \ gnupg2 \ lsb-release \ chromium-browser \ && apt-get clean # Clone the updated repository RUN git clone https://github.com/lilpulgoxxx/socialwarriors.git /app/socialwarriors # Set working directory to socialwarriors WORKDIR /app/socialwarriors # Create the 'saves' folder and set permissions RUN mkdir -p /app/socialwarriors/saves && chmod 777 /app/socialwarriors/saves # Install Python dependencies RUN pip3 install -r requirements.txt RUN pip3 install requests jsonpatch # Download Flash Player for Linux RUN wget https://archive.org/download/flashplayerarchive/pub/flashplayer/installers/archive/fp_32.0.0.371_archive.zip -O /tmp/flashplayer.zip && \ unzip /tmp/flashplayer.zip -d /tmp && \ mkdir -p /usr/lib/adobe-flashplugin && \ mv /tmp/32_0_r0_371/flashplayer32_0r0_371_linuxpep.x86_64.tar.gz /tmp/flashplayer.tar.gz && \ tar -xvzf /tmp/flashplayer.tar.gz -C /usr/lib/adobe-flashplugin # Set flags for PPAPI Flash ENV CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version=32.0.0.371" # Create a script to find and run server.py RUN echo '#!/bin/bash \n\ if [ -f "server.py" ]; then \n\ echo "Found server.py, running it..."; \n\ python3 server.py; \n\ else \n\ echo "Error: server.py not found."; \n\ exit 1; \n\ fi' > /app/socialwarriors/start.sh && chmod +x /app/socialwarriors/start.sh # Set the default command to run the start script CMD ["/app/socialwarriors/start.sh"]