nomid2 commited on
Commit
786e187
·
verified ·
1 Parent(s): 430f660

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -14
Dockerfile CHANGED
@@ -1,19 +1,11 @@
1
- # Use the pre-built image for the new-api service
2
  FROM calciumion/new-api:latest
3
 
4
- # The base image (calciumion/new-api:latest) already defines:
5
- # - The default command to run the application.
6
- # - The working directory.
7
- # - The exposed port (which is 3000 for new-api).
8
 
9
- # The command "--log-dir /app/logs" from your docker-compose.yml:
10
- # The calciumion/new-api documentation states that logs are stored by default
11
- # in a 'logs' subdirectory relative to the executable.
12
- # If the application's executable is within a directory like /app,
13
- # and you mount a volume to /app/logs, the logs should be captured there
14
- # without needing to override the CMD, assuming /app/logs is the default or
15
- # the application is run from /app.
16
 
17
- # We will handle port mapping, volume mounting, and environment variables
18
- # through Hugging Face Spaces settings (README.md and Space settings pages).
19
  CMD ["--log-dir", "/app/logs"]
 
 
1
  FROM calciumion/new-api:latest
2
 
3
+ # 复制包装脚本到镜像中并赋予执行权限
4
+ COPY entrypoint-wrapper.sh /entrypoint-wrapper.sh
5
+ RUN chmod +x /entrypoint-wrapper.sh
 
6
 
7
+ # 设置新的入口点为包装脚本
8
+ ENTRYPOINT ["/entrypoint-wrapper.sh"]
 
 
 
 
 
9
 
10
+ # --log-dir 参数作为 CMD 传递给包装脚本,包装脚本会再传递给 /one-api
 
11
  CMD ["--log-dir", "/app/logs"]