From 005ed5e5af5c22e3c5d3a149445e23c060e0f0fe Mon Sep 17 00:00:00 2001 From: ludelanier Date: Wed, 8 May 2024 04:43:09 +0200 Subject: [PATCH] images --- Dockerfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f00ef9e..699d7fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,19 @@ -FROM node:lts-alpine as builder +FROM node:16 +# Set the working directory in the container WORKDIR /app -COPY . ./ -RUN npm install && vite build -FROM nginx:alpine +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ -COPY --from=builder /app/dist /usr/share/nginx/html \ No newline at end of file +# Install app dependencies +RUN npm install + +# Copy the rest of your application code to the working directory +COPY . . + +# Expose a port to communicate with the React app +EXPOSE 5173 + +# Start your React app +CMD ["npm", "run", "dev"] \ No newline at end of file