# Use official Node.js image FROM node:20 # Set working directory WORKDIR /app # Copy only package.json and package-lock.json for install step COPY package.json ./ # If you have a package-lock.json or pnpm-lock.yaml/yarn.lock, copy it as well # COPY package-lock.json ./ # Install dependencies RUN npm install # Now copy the rest of the app COPY . . # Expose the Vite dev server port EXPOSE 5173 # Set environment variable if desired (can be overridden in compose) ENV HOST=0.0.0.0 # Default command runs Vite dev server CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]