-
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 692 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (19 loc) · 692 Bytes
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
# Development Dockerfile for Readme Design Kit
FROM node:20-alpine
WORKDIR /app
# Install dependencies first for better caching
COPY package.json package-lock.json ./
RUN npm install
# Copy the rest of the source code
COPY . .
# Expose Vite default port
EXPOSE 5173
# Set environment variables for Vite HMR
ENV NODE_ENV=development
ENV CHOKIDAR_USEPOLLING=true
ENV WATCHPACK_POLLING=true
# Start Vite dev server with HMR enabled
CMD ["vite", "--host", "0.0.0.0", "--port", "5173"]
# To run this container with hot reloading, use:
# docker build -t readme-design-kit .
# docker run -it --rm -p 5173:5173 -v ${PWD}:/app -v /app/node_modules -e CHOKIDAR_USEPOLLING=true readme-design-kit