E
E
EVOSandru62021-08-20 11:12:11
Docker
EVOSandru6, 2021-08-20 11:12:11

How to run Vue in docker in dev mode?

Hi guys, maybe someone in the subject:

FROM node:16.5-alpine
ARG APP_DIR=/app
ARG LOCAL_APP_PATH=cabinet
RUN mkdir -p ${APP_DIR}
WORKDIR ${APP_DIR}
COPY ${LOCAL_APP_PATH}/package*.json ./
RUN npm i;
RUN npm i @vue/cli -g
EXPOSE 8080
CMD npm run serve


Swears in the logs:

"serve": "vue-cli-service serve",

Like:
sh: vue-cli-service: not found

How so? Did I
RUN npm i @vue/cli -gscrew up?!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2021-08-20
@sergiks

maybe add the path to the installed vue-cli-service
ENV PATH=${APP_DIR}/node_modules/.bin:$PATH

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question