Spaces:
Running
Running
File size: 1,885 Bytes
de28065 4a8b918 de28065 4a8b918 de28065 4a8b918 de28065 ffe306d 4a8b918 e8aa67e 4a8b918 b86b326 4a8b918 ccf7a1c df6e024 4a8b918 ca44a2b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# 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 repository
RUN git clone https://github.com/lilpulgoxxx/socialemperors.git /app/socialemperors
# Set working directory to socialemperors
WORKDIR /app/socialemperors
# Create the 'saves' folder and set permissions
RUN mkdir -p /app/socialemperors/saves && chmod 777 /app/socialemperors/saves
# Install Python dependencies
RUN pip3 install -r requirements.txt
# 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/socialemperors/start.sh && chmod +x /app/socialemperors/start.sh
# Set the default command to run the start script
CMD ["/app/socialemperors/start.sh"]
|