23 lines
573 B
Docker
23 lines
573 B
Docker
|
FROM node:lts AS dev
|
||
|
# some dir for our code
|
||
|
WORKDIR /app
|
||
|
RUN yarn global add @vue/cli @vue/cli-service-global
|
||
|
# mount code
|
||
|
VOLUME ["/app"]
|
||
|
# this is how we start
|
||
|
CMD [ "vue", "ui", "--host", "0.0.0.0", "--port", "8080" ]
|
||
|
|
||
|
FROM node:lts AS build
|
||
|
# some dir for our code
|
||
|
WORKDIR /app
|
||
|
# install dependencies
|
||
|
COPY package*.json yarn*.lock ./
|
||
|
RUN yarn --production=false
|
||
|
# copy code
|
||
|
COPY . .
|
||
|
RUN yarn build
|
||
|
|
||
|
FROM nginx:stable-alpine AS prod
|
||
|
COPY --from=build /app/index.html /app/favicon.ico /usr/share/nginx/html/
|
||
|
COPY --from=build /app/dist/* /usr/share/nginx/html/dist/
|