wenjiandeniu commited on
Commit
a713f1a
·
verified ·
1 Parent(s): e6ea4f8

Fix shutdown panic in Docker build

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -0
Dockerfile CHANGED
@@ -10,6 +10,12 @@ ADD https://codeload.github.com/james-6-23/codex2api/tar.gz/refs/heads/main /tmp
10
 
11
  RUN tar -xzf /tmp/codex2api.tar.gz --strip-components=1 -C /src
12
 
 
 
 
 
 
 
13
  FROM node:20-alpine AS frontend-builder
14
 
15
  WORKDIR /frontend
 
10
 
11
  RUN tar -xzf /tmp/codex2api.tar.gz --strip-components=1 -C /src
12
 
13
+ # Upstream currently stops the store twice during shutdown, which causes
14
+ # `panic: close of closed channel` on platforms that send SIGTERM during
15
+ # health/restart cycles. Remove the deferred stop and keep the explicit
16
+ # shutdown path.
17
+ RUN sed -i '/defer store.Stop()/d' /src/main.go
18
+
19
  FROM node:20-alpine AS frontend-builder
20
 
21
  WORKDIR /frontend