diff --git a/Dockerfile b/Dockerfile index 872bb3d..d6a48dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ # - A tiny wrapper entrypoint that runs litellm --config /app/config.yaml # --------------------------------------------------------------- -# 1. Use the official LiteLLM image (based on python:3.12-slim) -FROM litellm/litellm:latest AS base +# 1. Use the official LiteLLM image (based on Alpine Linux) +FROM litellm/litellm:latest # 2. Set environment variables that control the router ENV \ @@ -26,10 +26,10 @@ ENV \ TOOL_ROUTER_ALWAYS_INCLUDE=get_time,help,list_tools \ TOOL_ROUTER_EMBEDDING_MODEL=text-embedding-3-small -# 3. Create a non-root user (optional but recommended) -RUN useradd -m litellm && \ +# 3. Create a non-root user (Alpine uses adduser, not useradd) +RUN adduser -D -u 1000 litellm && \ mkdir -p /app && \ - chown litellm:litellm /app + chown -R litellm:litellm /app # 4. Switch to that user for the rest of the steps USER litellm @@ -56,4 +56,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ CMD curl -fsS "http://127.0.0.1:${PORT}/health" || exit 1 # 9. Default command - run the proxy with our config file -CMD ["sh", "-c", "litellm --config /app/config.yaml --port ${PORT} --host 0.0.0.0"] \ No newline at end of file +CMD ["sh", "-c", "litellm --config /app/config.yaml --port ${PORT} --host 0.0.0.0"]