Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files8 unmodified lines9101112131415161718192021222324252627288 unmodified linesENV API_TOKEN=$HF_TOKEN# Set working directoryWORKDIR /app# Copy package filesCOPY package*.json ./# Install dependenciesRUN npm install# Copy the rest of the applicationCOPY . .# Build the Next.js application# Note: We don't use turbopack for production buildsRUN npm run build# Expose the port the app runs on8 unmodified lines910111213141516171819202122232425262728293031323334358 unmodified linesENV API_TOKEN=$HF_TOKEN# Create app directory and set permissionsWORKDIR /app# Create a non-root userRUN addgroup --system --gid 1001 nodejs && \adduser --system --uid 1001 nextjs && \chown -R nextjs:nodejs /app# Copy package filesCOPY --chown=nextjs:nodejs package*.json ./# Install dependenciesRUN npm install# Copy the rest of the applicationCOPY --chown=nextjs:nodejs . .# Switch to non-root userUSER nextjs# Build the Next.js applicationRUN npm run build# Expose the port the app runs on
Dockerfile+11-4