redline-api/Dockerfile
wangdong 8f5dad5360
Some checks are pending
Pre-build Binary / build (push) Waiting to run
Add build script, Makefile, simplified Dockerfile, update README
2026-07-28 02:33:55 +08:00

26 lines
722 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.

# ============================================================
# 快速构建模式(使用预编译的二进制和前端)
# 先运行 build.sh 预编译,再构建此镜像
# 构建命令: docker build -t redline-api .
# ============================================================
FROM alpine:latest
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
# 复制预编译的 Go 二进制(由 build.sh 生成)
COPY one-api /app/one-api
# 复制预构建的前端文件(由 build.sh 生成)
COPY web/build /app/web/build
# 复制配置文件模板
COPY .env.example /app/.env.example
EXPOSE 3000
# 默认工作目录为 /data日志和数据保存在此
WORKDIR /data
ENTRYPOINT ["/app/one-api"]