导航

Docker 制作前端Vue的镜像

Posted on 2021-03-26 11:07  杨彬Allen  阅读(411)  评论(0)    收藏  举报

 

Dockerfile内容:

FROM node:12

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

EXPOSE 8806
CMD [ "node", "dist/app.js" ]