errorcode418/php
0
1# Use the smallest possible Ubuntu image2FROM ubuntu:22.043 4# Set environment variables to avoid interactive prompts during installation5ENV DEBIAN_FRONTEND=noninteractive6 7# Update package lists and install PHP and curl8RUN apt-get update && \9 apt-get install -y php curl && \10 apt-get clean && \11 rm -rf /var/lib/apt/lists/*12 13# Set the working directory14WORKDIR /var/www/html15 16# 复制当前目录下所有文件到 /var/www/html17COPY . .18 19# 设置权限(可选,但建议根据实际需求调整)20RUN chmod -R 755 /var/www/html21 22# Expose the port the server will run on23EXPOSE 786024 25# Start the PHP built-in server26CMD ["php", "-S", "0.0.0.0:7860"]