Spaces:
Sleeping
Sleeping
init
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
|
@@ -3,18 +3,17 @@ FROM node:22-slim
|
|
| 3 |
RUN apt-get update && apt-get install -y --no-install-recommends libgl1 \
|
| 4 |
&& rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
-
RUN useradd -m -u 1000 user
|
| 7 |
WORKDIR /app
|
| 8 |
-
RUN chown
|
| 9 |
|
| 10 |
-
USER
|
| 11 |
-
ENV PATH="/home/
|
| 12 |
|
| 13 |
-
COPY --chown=
|
| 14 |
# Install dev deps so Nest CLI is available during build (even if NODE_ENV=production is set externally)
|
| 15 |
RUN npm ci --include=dev
|
| 16 |
|
| 17 |
-
COPY --chown=
|
| 18 |
RUN npm run build
|
| 19 |
# Trim dev dependencies for the runtime image
|
| 20 |
RUN npm prune --omit=dev
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y --no-install-recommends libgl1 \
|
| 4 |
&& rm -rf /var/lib/apt/lists/*
|
| 5 |
|
|
|
|
| 6 |
WORKDIR /app
|
| 7 |
+
RUN chown node:node /app
|
| 8 |
|
| 9 |
+
USER node
|
| 10 |
+
ENV PATH="/home/node/.local/bin:$PATH"
|
| 11 |
|
| 12 |
+
COPY --chown=node package*.json ./
|
| 13 |
# Install dev deps so Nest CLI is available during build (even if NODE_ENV=production is set externally)
|
| 14 |
RUN npm ci --include=dev
|
| 15 |
|
| 16 |
+
COPY --chown=node . /app
|
| 17 |
RUN npm run build
|
| 18 |
# Trim dev dependencies for the runtime image
|
| 19 |
RUN npm prune --omit=dev
|