fix npm issue
Browse files- Dockerfile +8 -3
Dockerfile
CHANGED
@@ -7,14 +7,19 @@ FROM python:3.12-slim
|
|
7 |
# Install npx globally using npm (often included with recent npm, but explicit install is safer)
|
8 |
# Clean up apt cache to reduce image size
|
9 |
RUN apt-get update && \
|
10 |
-
apt-get install -y --no-install-recommends curl
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
12 |
mv /root/.local/bin/uv /usr/local/bin/uv && \
|
13 |
-
# mv /root/.local/bin/uvx /usr/local/bin/uvx # uvx might not be needed unless you use uv run directly
|
14 |
-
npm install -g npx && \
|
15 |
apt-get clean && \
|
16 |
rm -rf /var/lib/apt/lists/*
|
17 |
|
|
|
18 |
# --- Python Dependency Installation (as root for system-wide access) ---
|
19 |
# Create cache directory for uv
|
20 |
RUN mkdir -p /.cache/uv
|
|
|
7 |
# Install npx globally using npm (often included with recent npm, but explicit install is safer)
|
8 |
# Clean up apt cache to reduce image size
|
9 |
RUN apt-get update && \
|
10 |
+
apt-get install -y --no-install-recommends curl git ca-certificates gnupg && \
|
11 |
+
mkdir -p /etc/apt/keyrings && \
|
12 |
+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
13 |
+
NODE_MAJOR=20 && \
|
14 |
+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
15 |
+
apt-get update && \
|
16 |
+
apt-get install nodejs -y && \
|
17 |
curl -LsSf https://astral.sh/uv/install.sh | sh && \
|
18 |
mv /root/.local/bin/uv /usr/local/bin/uv && \
|
|
|
|
|
19 |
apt-get clean && \
|
20 |
rm -rf /var/lib/apt/lists/*
|
21 |
|
22 |
+
|
23 |
# --- Python Dependency Installation (as root for system-wide access) ---
|
24 |
# Create cache directory for uv
|
25 |
RUN mkdir -p /.cache/uv
|