command | descriptions |
---|---|
FROM node:18 | Pull the nodejs docker image from dockerhub |
WORKDIR /app | working directory for docker image |
COPY ./package*.json ./ | copy package file into docker [package.json and package.lock.json] |
RUN yarn install | installing required dependencies into the docker container |
COPY . . | copy all the file and folder from local to docker container home or working directory |
CMD [ "yarn","run","dev" ] | Entry point for docker container |
export default defineConfig({
plugins: [react()],
server: {
watch: {
usePolling: true,
},
host: true, // Here
strictPort: true,
port: 3000,
}
})