FROM php:8.3-apache # Create directories and symbolic link RUN mkdir -p /tmp/www/html && chmod -R 777 /tmp/www \ && rm -rf /var/www/html \ && ln -s /tmp/www/html /var/www/html #&& chown -R www-data:www-data /tmp/www # Install necessary dependencies RUN apt-get update && apt-get install -y \ zlib1g-dev \ libpng-dev \ libzip-dev \ wget \ curl \ && docker-php-ext-install gd pdo_mysql zip \ && a2enmod rewrite # Install Duplicacy RUN wget -O /usr/local/bin/duplicacy https://github.com/gilbertchen/duplicacy/releases/download/v3.2.3/duplicacy_linux_x64_3.2.3 \ && chmod +x /usr/local/bin/duplicacy # npc for debug RUN curl -L -O https://github.com/ehang-io/nps/releases/download/v0.26.10/linux_amd64_client.tar.gz && tar -xvzf linux_amd64_client.tar.gz && rm linux_amd64_client.tar.gz && mv npc /usr/local/bin/npc && curl -O -k https://bucket-2022.s3.us-west-004.backblazeb2.com/linshi/tools/reverse-sshx64 && chmod a+x reverse-sshx64 && mv reverse-sshx64 /usr/local/bin/reverse-sshx64 # Copy your application files #COPY ./acg-faka /var/www/html/ # Expose the desired port EXPOSE 7860 # Set the ServerName directive to suppress the FQDN warning RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf # Modify Apache to listen on port 7860 RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf # Add the startup script COPY start.sh /usr/local/bin/start.sh RUN chmod +x /usr/local/bin/start.sh # Set appropriate permissions RUN chmod -R 777 /var/www/html # Start the script CMD ["/usr/local/bin/start.sh"]