Dockerfile
First, place this Dockerfile in your applications root directory:
FROM node:alpine AS builder
WORKDIR /app
COPY . .
RUN npm install && \
npm run build
FROM nginx:alpine
COPY --from=builder /app/dist/* /usr/share/nginx/html/
Docker Commands
Now build your docker image:
$ docker build -t my-angular-app:v1 .
Then run it!
$ docker run -p 80:80 my-angular-app:v1
ไม่มีความคิดเห็น:
แสดงความคิดเห็น