File size: 601 Bytes
f239eb2 e7ea500 1dfef54 e7ea500 1dfef54 e7ea500 93eda22 e7ea500 19a6d69 582512e 19a6d69 9fe417f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# Use the official Node.js image as the base
FROM node:18 AS build
# Set the working directory inside the container
WORKDIR /app
# Copy the entire project to the working directory
COPY . .
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
COPY package*.json ./
COPY src ./src
RUN npm install react-icons
RUN npm install
# Set the ownership of the /app directory to the node user
RUN chown -R node:node /app
# Expose the desired port
EXPOSE 7860
# Switch to the node user
USER node
# Start the application
CMD ["npm", "run", "dev", "--", "--host"] |