zhzabcd commited on
Commit
25cfa42
·
verified ·
1 Parent(s): 1e75ca4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM justsong/one-api
2
+
3
+ # 设置时区
4
+ ENV TZ=Asia/Shanghai
5
+
6
+ # 挂载卷
7
+ VOLUME /data
8
+
9
+ # 暴露端口
10
+ EXPOSE 3000
11
+
12
+ # 启动命令
13
+ CMD ["docker-entrypoint.sh"]
14
+
15
+ # 容器名称
16
+ LABEL name="one-api"
17
+
18
+ # 重启策略
19
+ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
20
+ CMD curl -f http://localhost:3000/ || exit 1
21
+
22
+ # 运行容器
23
+ ENTRYPOINT ["docker-entrypoint.sh"]