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