FROM ubuntu:22.04 # 安装必要系统工具 RUN apt-get update && apt-get install -y \ wget \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # 下载 Lightpanda RUN wget -O /usr/local/bin/lightpanda \ https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux \ && chmod +x /usr/local/bin/lightpanda # 创建启动脚本 RUN echo '#!/bin/bash' > /start.sh && \ echo 'echo "启动 Lightpanda CDP 服务器 (端口: 7860)..."' >> /start.sh && \ echo 'exec /usr/local/bin/lightpanda serve \' >> /start.sh && \ echo ' --obey-robots \' >> /start.sh && \ echo ' --log-format pretty \' >> /start.sh && \ echo ' --log-level info \' >> /start.sh && \ echo ' --host 0.0.0.0 \' >> /start.sh && \ echo ' --port 7860' >> /start.sh && \ chmod +x /start.sh EXPOSE 7860 CMD ["/start.sh"]