You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
428 B
18 lines
428 B
# first stage builds vue
|
|
FROM node:16 as build-stage
|
|
WORKDIR /build
|
|
COPY . .
|
|
RUN npm install
|
|
RUN npm run build
|
|
|
|
# second stage copies the static dist files and Node server files
|
|
FROM node:16 as production-stage
|
|
WORKDIR /app
|
|
COPY package.json vueBaseAppServer.js ./
|
|
COPY --from=build-stage /build/dist/ dist/
|
|
RUN npm install --omit=dev
|
|
RUN rm -rf build
|
|
|
|
# open port 3000 and run Node server
|
|
EXPOSE 3000
|
|
CMD [ "node", "index.js" ] |