Spaces:
Running
Running
update
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# Multi-stage build for AnyCoder Docker Space
|
| 2 |
|
| 3 |
# Stage 1: Build frontend
|
| 4 |
-
FROM node:
|
| 5 |
|
| 6 |
WORKDIR /build
|
| 7 |
|
|
@@ -25,12 +25,12 @@ RUN npm run build
|
|
| 25 |
FROM python:3.11-slim
|
| 26 |
|
| 27 |
# Install system dependencies as root (git for pip, nodejs for frontend)
|
|
|
|
| 28 |
RUN apt-get update && \
|
| 29 |
-
apt-get install -y --no-install-recommends \
|
| 30 |
-
|
| 31 |
-
nodejs \
|
| 32 |
-
|
| 33 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 34 |
|
| 35 |
# Set up a new user named "user" with user ID 1000
|
| 36 |
RUN useradd -m -u 1000 user
|
|
|
|
| 1 |
# Multi-stage build for AnyCoder Docker Space
|
| 2 |
|
| 3 |
# Stage 1: Build frontend
|
| 4 |
+
FROM node:22-slim AS frontend-builder
|
| 5 |
|
| 6 |
WORKDIR /build
|
| 7 |
|
|
|
|
| 25 |
FROM python:3.11-slim
|
| 26 |
|
| 27 |
# Install system dependencies as root (git for pip, nodejs for frontend)
|
| 28 |
+
# Install Node.js 22 from NodeSource (Debian repo only has v18)
|
| 29 |
RUN apt-get update && \
|
| 30 |
+
apt-get install -y --no-install-recommends curl ca-certificates gnupg git && \
|
| 31 |
+
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
| 32 |
+
apt-get install -y --no-install-recommends nodejs && \
|
| 33 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
|
| 34 |
|
| 35 |
# Set up a new user named "user" with user ID 1000
|
| 36 |
RUN useradd -m -u 1000 user
|