# 使用 Debian 作为基础镜像
FROM debian:latest

# 设置工作目录
WORKDIR /

# 复制 ghosteye-linux-amd64 到镜像中
COPY ghosteye-linux-amd64 /

# 复制启动脚本到镜像中
COPY start.sh /

# 给启动脚本执行权限
RUN chmod +x /start.sh /ghosteye-linux-amd64

# 安装任何必要的依赖（可选，根据你的程序需要）
RUN apt-get update && apt-get install -y \
    # 例如：curl, vim, etc. 如果需要其他工具可以在这里添加
    && rm -rf /var/lib/apt/lists/*

# 暴露必要的端口（假设程序需要）
EXPOSE 8080

RUN apt-get update && apt-get install -y netcat-openbsd rlwrap

# 启动容器时执行启动脚本
CMD ["/start.sh"]
