# 使用官方的Nginx基础镜像 FROM nginx:latest # 创建/app工作目录 RUN mkdir /app # 设置工作目录 WORKDIR /app # 复制Nginx配置文件 COPY nginx.conf /etc/nginx/nginx.conf COPY index.html /usr/share/nginx/html/index.html # 在Dockerfile中添加 RUN chmod -R 777 /var/cache/nginx RUN chmod -R 777 /var/run /etc/nginx/conf.d # 复制frps及配置文件到/app目录 COPY frps /app/frps COPY frps.toml /app/frps.toml # 复制start.sh到/app目录,并给予执行权限 COPY start.sh /app/start.sh RUN chmod +x /app/start.sh RUN chmod +x /app/frps # 定义启动命令 CMD ["/app/start.sh"]