AUXteam commited on
Commit
ec95efc
·
verified ·
1 Parent(s): d530f14

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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
- RUN adduser --system --uid 1000 nextjs
32
 
33
  COPY --from=builder /app/public ./public
34
 
35
  # Set the correct permission for prerender cache
36
  RUN mkdir .next
37
- RUN chown nextjs .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=nextjs /app/.next/standalone ./
42
- COPY --from=builder --chown=nextjs /app/.next/static ./.next/static
43
 
44
- USER nextjs
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