winblows / Dockerfile
no1b4me's picture
Update Dockerfile
638d460 verified
raw
history blame contribute delete
454 Bytes
FROM node:18-slim
# Create the log and db directories and set permissions
RUN mkdir -p /usr/src/app/log /usr/src/app/db && \
chown -R node:node /usr/src/app/log /usr/src/app/db
# Set the working directory
WORKDIR /usr/src/app
# Copy package.json and package-lock.json first
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of your application files
COPY . .
# Command to run your application
CMD ["node", "index.js"]