Update Dockerfile
Browse files- 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 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
# - The exposed port (which is 3000 for new-api).
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
| 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 |
-
#
|
| 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"]
|