easy-clean-bot / Dockerfile
akhaliq's picture
akhaliq HF Staff
Upload Dockerfile with huggingface_hub
eb2e237 verified
raw
history blame contribute delete
534 Bytes
FROM node:18-slim
# Set up user with ID 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set working directory
WORKDIR $HOME/app
# Copy package files with proper ownership
COPY --chown=user package*.json ./
# Install dependencies
RUN npm install
# Copy rest of the application with proper ownership
COPY --chown=user . .
# Build the Next.js app
RUN npm run build
# Expose port 7860
EXPOSE 7860
# Start the application on port 7860
CMD ["npm", "start", "--", "-p", "7860"]