In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "how Docker runs the Vue project". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how Docker runs the Vue project.
I am not the front end, only for deployment. The content of Dockfile mainly comes from the official Vue: https://cn.vuejs.org/v2/cookbook/dockerize-vuejs-app.html
Go directly to Dockerfile, almost the same as the official one, but the details above have been configured to be closer to the actual use. For more information, please see Dockerfile:
FROM node:lts-alpine# if you are in China, this line configuration is very necessary, otherwise packing will be very slow, the reasons, all understand. RUN npm config set registry https://registry.npm.taobao.org# install simple http server for serving static contentRUN npm install-g http-server# make the 'app' folder the current working directoryWORKDIR / app# copy both' package.json' and 'package-lock.json' (if available) COPY package*.json. / # install project dependenciesRUN npm install# copy project files and folders to the current working directory (i.e.' app' folder) COPY. . # build app for production with minificationRUN npm run build:prodEXPOSE 900 adds port custom configuration to avoid CMD conflicts with other K8S container ports ["http-server", "- p", "9000", "dist"]
Build a Docker image:
Docker build-t registry.cn-hangzhou.aliyuncs.com/xxx/xxx.
Test image availability:
Docker run-p 80 9000-- rm registry.cn-hangzhou.aliyuncs.com/xxx/xxx
At this point, I believe you have a deeper understanding of "how Docker runs the Vue project". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.