powerful-dl-server-1 / Dockerfile
making-new-thing-testing-pushing-huginface's picture
Update Dockerfile
b5bdce8 verified
# Use Ubuntu 22.04 as the base image
FROM ubuntu:22.04
# Set the working directory in the container
WORKDIR /app
# Install common tools and dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
curl \
wget \
git \
unzip \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
# Add PHP repository and install PHP
RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && \
apt-get update --allow-insecure-repositories && \
DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-cli php7.4-fpm --allow-unauthenticated && \
DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl --allow-unauthenticated && \
echo "tzdata tzdata/Areas select US" | debconf-set-selections && \
echo "tzdata tzdata/Zones/US select Eastern" | debconf-set-selections && \
ln -fs /usr/share/zoneinfo/US/Eastern /etc/localtime && \
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure -f noninteractive tzdata
# Set up Rapidleech
RUN mkdir -p /var/www/html && \
cd /var/www/html && \
git clone https://github.com/PBhadoo/Rapidleech . && \
mkdir files && \
chmod 777 files && \
chmod 777 configs && \
chmod 777 configs/files.lst && \
rm -rf rar && wget https://rarlab.com/rar/rarlinux-x64-612.tar.gz && tar -xvf rarlinux-x64-612.tar.gz && rm -f rarlinux-x64-612.tar.gz && \
chmod -R 777 rar && chmod -R 777 rar/* && \
sed -i "s/'download_dir_is_changeable' => false,/'download_dir_is_changeable' => true,/" /var/www/html/configs/config.php && \
sed -i "s/'disable_delete' => true,/'disable_delete' => false,/" /var/www/html/configs/config.php
# Expose port 7860
EXPOSE 7860
# Create a startup script
RUN echo '#!/bin/bash\n\
php -S 0.0.0.0:7860 -t /var/www/html' > /start.sh && \
chmod +x /start.sh
# Start PHP built-in server using the startup script
CMD ["/start.sh"]