File tree 2 files changed +26
-14
lines changed
2 files changed +26
-14
lines changed Original file line number Diff line number Diff line change 1
1
# Base image for building
2
- ARG LITELLM_BUILD_IMAGE=python:3.13.1-slim
2
+ ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/ python:latest-dev
3
3
4
4
# Runtime image
5
- ARG LITELLM_RUNTIME_IMAGE=python:3.13.1-slim
5
+ ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/ python:latest-dev
6
6
# Builder stage
7
7
FROM $LITELLM_BUILD_IMAGE AS builder
8
8
9
9
# Set the working directory to /app
10
10
WORKDIR /app
11
11
12
+ USER root
13
+
12
14
# Install build dependencies
13
- RUN apt-get clean && apt-get update && \
14
- apt-get install -y gcc python3-dev && \
15
- rm -rf /var/lib/apt/lists/*
15
+ RUN apk update && \
16
+ apk add --no-cache gcc python3-dev openssl openssl-dev
17
+
16
18
17
19
RUN pip install --upgrade pip && \
18
20
pip install build
@@ -49,8 +51,12 @@ RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
49
51
# Runtime stage
50
52
FROM $LITELLM_RUNTIME_IMAGE AS runtime
51
53
52
- # Update dependencies and clean up - handles debian security issue
53
- RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
54
+ # Ensure runtime stage runs as root
55
+ USER root
56
+
57
+ # Install runtime dependencies
58
+ RUN apk update && \
59
+ apk add --no-cache openssl
54
60
55
61
WORKDIR /app
56
62
# Copy the current directory contents into the container at /app
Original file line number Diff line number Diff line change 1
1
# Base image for building
2
- ARG LITELLM_BUILD_IMAGE=python:3.13.1-slim
2
+ ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/ python:latest-dev
3
3
4
4
# Runtime image
5
- ARG LITELLM_RUNTIME_IMAGE=python:3.13.1-slim
5
+ ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/ python:latest-dev
6
6
# Builder stage
7
7
FROM $LITELLM_BUILD_IMAGE AS builder
8
8
9
9
# Set the working directory to /app
10
10
WORKDIR /app
11
11
12
+ USER root
13
+
12
14
# Install build dependencies
13
- RUN apt-get clean && apt-get update && \
14
- apt-get install -y gcc python3-dev && \
15
- rm -rf /var/lib/apt/lists/*
15
+ RUN apk update && \
16
+ apk add --no-cache gcc python3-dev openssl openssl-dev
17
+
16
18
17
19
RUN pip install --upgrade pip && \
18
20
pip install build
@@ -38,8 +40,12 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
38
40
# Runtime stage
39
41
FROM $LITELLM_RUNTIME_IMAGE AS runtime
40
42
41
- # Update dependencies and clean up - handles debian security issue
42
- RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
43
+ # Ensure runtime stage runs as root
44
+ USER root
45
+
46
+ # Install runtime dependencies
47
+ RUN apk update && \
48
+ apk add --no-cache openssl
43
49
44
50
WORKDIR /app
45
51
# Copy the current directory contents into the container at /app
You can’t perform that action at this time.
0 commit comments