L
L
luckyjenro02022-04-09 14:18:12
Docker
luckyjenro0, 2022-04-09 14:18:12

How to make docker/vue start with mode=dev and watch?

Hello! Here is the docker script I use to launch vue-app:

FROM node:16.14.2-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install 
COPY ./ .
RUN npm run build

FROM nginx as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf

ENV NODE_ENV=production
EXPOSE 443
CMD ["nginx", "-g", "daemon off;"]


How can I make vue start in dev mode and listen for file changes, like watch.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NIGVI, 2022-04-09
@NIGVI

watch-ers do not work in containers on windows. Only their analogue watchFile works, but it is old and not reliable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question