dockerfile

最后发布时间 : 2023-02-25 11:05:23 浏览量 :

nginx

# Step 1: Build the app in image 'builder'
FROM node:12.0.0-alpine AS builder

RUN npm config set registry https://registry.npm.taobao.org
RUN npm config set unsafe-perm true
RUN npm install -g @angular/cli

WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run build

# Step 2: Use build output from 'builder'
FROM nginx:stable-alpine
LABEL version="1.0"

COPY nginx.conf /etc/nginx/nginx.conf

WORKDIR /usr/share/nginx/html
COPY --from=builder /usr/src/app/dist/tower-web/ .
Sending build context to Docker daemon  11.63MB
Step 1/13 : FROM node:12.0.0-alpine AS builder
 ---> 80a733d0cd8c
Step 2/13 : RUN npm config set registry https://registry.npm.taobao.org
 ---> Running in fda21dc65a43
Removing intermediate container fda21dc65a43
 ---> 6200f536b9d5
Step 3/13 : RUN npm config set unsafe-perm true
 ---> Running in 466863834a09
Removing intermediate container 466863834a09
 ---> 68be4424035b
Step 4/13 : RUN npm install -g @angular/cli
 ---> Running in 4e11e44c2727