Files
gateway/Dockerfile
2026-04-08 22:14:21 +08:00

25 lines
543 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 最小化Docker镜像
FROM busybox:uclibc
WORKDIR /app
# 复制时区数据(从本地复制)
COPY timezone/localtime /etc/localtime
COPY timezone/timezone /etc/timezone
COPY timezone/Shanghai /usr/share/zoneinfo/Asia/Shanghai
# 复制预构建的二进制文件和配置文件
COPY gateway_binary ./main
COPY config.yml ./
# 添加执行权限
RUN chmod +x /app/main
# 创建日志目录
RUN mkdir -p /logs /app/resource/log/run /app/resource/log/server
EXPOSE 8000
# 使用root用户运行避免权限问题
CMD ["./main"]