Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -27,21 +27,21 @@ WORKDIR /app
|
|
| 27 |
ENV NODE_ENV production
|
| 28 |
ENV NEXT_TELEMETRY_DISABLED 1
|
| 29 |
|
| 30 |
-
# HF Spaces run with UID 1000
|
| 31 |
-
|
| 32 |
|
| 33 |
COPY --from=builder /app/public ./public
|
| 34 |
|
| 35 |
# Set the correct permission for prerender cache
|
| 36 |
RUN mkdir .next
|
| 37 |
-
RUN chown
|
| 38 |
|
| 39 |
# Automatically leverage output traces to reduce image size
|
| 40 |
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
| 41 |
-
COPY --from=builder --chown=
|
| 42 |
-
COPY --from=builder --chown=
|
| 43 |
|
| 44 |
-
USER
|
| 45 |
|
| 46 |
EXPOSE 7860
|
| 47 |
|
|
|
|
| 27 |
ENV NODE_ENV production
|
| 28 |
ENV NEXT_TELEMETRY_DISABLED 1
|
| 29 |
|
| 30 |
+
# HF Spaces run with UID 1000, which is the 'node' user in node:22-alpine
|
| 31 |
+
# We ensure the 'node' user is used to avoid UID conflicts
|
| 32 |
|
| 33 |
COPY --from=builder /app/public ./public
|
| 34 |
|
| 35 |
# Set the correct permission for prerender cache
|
| 36 |
RUN mkdir .next
|
| 37 |
+
RUN chown node:node .next
|
| 38 |
|
| 39 |
# Automatically leverage output traces to reduce image size
|
| 40 |
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
| 41 |
+
COPY --from=builder --chown=node:node /app/.next/standalone ./
|
| 42 |
+
COPY --from=builder --chown=node:node /app/.next/static ./.next/static
|
| 43 |
|
| 44 |
+
USER node
|
| 45 |
|
| 46 |
EXPOSE 7860
|
| 47 |
|