sfun commited on
Commit
130afaa
·
verified ·
1 Parent(s): 7b4a15d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -24,6 +24,12 @@ RUN go build -o /coze-discord-proxy
24
  # 使用 Alpine 镜像作为最终镜像
25
  FROM alpine
26
 
 
 
 
 
 
 
27
  # 安装基本的运行时依赖
28
  RUN apk --no-cache add ca-certificates tzdata
29
 
@@ -34,5 +40,6 @@ COPY --from=builder /coze-discord-proxy .
34
  EXPOSE 7077
35
  # 工作目录
36
  WORKDIR /app/coze-discord-proxy/data
 
37
  # 设置入口命令
38
  ENTRYPOINT ["/coze-discord-proxy"]
 
24
  # 使用 Alpine 镜像作为最终镜像
25
  FROM alpine
26
 
27
+ # 添加 ARG 指令来接收构建时参数
28
+ ARG CONFIG
29
+
30
+ # 使用 ENV 指令设置环境变量
31
+ ENV CONFIG $CONFIG
32
+
33
  # 安装基本的运行时依赖
34
  RUN apk --no-cache add ca-certificates tzdata
35
 
 
40
  EXPOSE 7077
41
  # 工作目录
42
  WORKDIR /app/coze-discord-proxy/data
43
+ COPY ./bot_config.json /app/coze-discord-proxy/data/config/bot_config.json
44
  # 设置入口命令
45
  ENTRYPOINT ["/coze-discord-proxy"]