tst / Dockerfile
deepak191z's picture
Update Dockerfile
5b45fe8 verified
raw
history blame
784 Bytes
FROM node:20
# Install git
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Set build arguments for GitHub access
ARG GITHUB_USERNAME
ARG GITHUB_TOKEN
# Clone the private repository securely
RUN git clone https://github.com/viratxd/prompt-glow-lab-00.git /usr/src/app
# Set working directory
WORKDIR /usr/src/app
# Install specific npm version and dependencies
RUN npm install -g [email protected]
RUN npm install
# Create and switch to non-root user
RUN groupadd -r appuser && useradd -r -g appuser appuser
# 🧹 Fix permissions AFTER everything is copied
RUN chown -R appuser:appuser /usr/src/app
# Switch to non-root user
USER appuser
# Expose Vite dev port (usually 5173, adjust if needed)
EXPOSE 7860
# Start dev server
CMD ["npm", "run", "dev"]