node-pt / Dockerfile
bardd's picture
Update Dockerfile
eca71ed verified
raw
history blame
465 Bytes
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of your application code
COPY . .
# Change ownership of the /app directory to the node user
RUN chown -R node:node /app
# Switch to the node user
USER node
# Expose the port your app runs on
EXPOSE 7860
# Command to run your app in development mode
CMD ["npm", "run", "start:dev"]