focusprogram commited on
Commit
b2c683a
·
verified ·
1 Parent(s): f1a7ab1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -0
Dockerfile CHANGED
@@ -1,7 +1,19 @@
1
  FROM finab/bark-server:latest
2
 
 
 
 
 
 
 
 
 
 
3
  ENV TZ=Asia/Shanghai
4
 
 
 
 
5
  EXPOSE 8080
6
 
7
  ENTRYPOINT ["/entrypoint.sh"]
 
1
  FROM finab/bark-server:latest
2
 
3
+ # 尝试使用 root 用户
4
+ USER root
5
+
6
+ # 使用 shell 形式的 RUN 命令,并添加错误处理
7
+ RUN set -ex; \
8
+ rm -f /etc/localtime 2>/dev/null || true; \
9
+ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2>/dev/null || true
10
+
11
+ # 设置时区环境变量作为备选方案
12
  ENV TZ=Asia/Shanghai
13
 
14
+ # 切换回原始用户
15
+ USER nobody
16
+
17
  EXPOSE 8080
18
 
19
  ENTRYPOINT ["/entrypoint.sh"]