27 lines
719 B
Docker
27 lines
719 B
Docker
# Development Dockerfile - Vite Dev Server with Hot Reload
|
|
FROM node:18-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies (use --legacy-peer-deps to handle React 19 peer dependency conflicts)
|
|
RUN npm install --legacy-peer-deps
|
|
|
|
# Copy source code (will be mounted as volume, but needed for initial setup)
|
|
COPY . .
|
|
|
|
# Copy startup script
|
|
COPY container_startup.sh /app/
|
|
RUN chmod +x /app/container_startup.sh
|
|
|
|
# Expose Vite dev server port
|
|
EXPOSE 5173
|
|
|
|
# Use startup script as entrypoint to log container lifecycle
|
|
# Start Vite dev server with host binding for Docker
|
|
ENTRYPOINT ["/app/container_startup.sh"]
|
|
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"]
|
|
|