Update Dockerfile to include npm install step
This commit is contained in:
parent
cf2db61c84
commit
8fa2f8cdd7
22
Dockerfile
22
Dockerfile
@ -1,19 +1,13 @@
|
||||
FROM node:lts-alpine as build-stage
|
||||
WORKDIR /app
|
||||
# COPY package*.json ./
|
||||
# RUN npm install
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# FROM nginx:stable-alpine as production-stage
|
||||
# COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
# COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
|
||||
# EXPOSE 32166
|
||||
# CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
FROM nginx:stable-alpine
|
||||
COPY /dist /usr/share/nginx/html
|
||||
COPY /nginx.conf /etc/nginx/nginx.conf
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 32166
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
@ -22,3 +16,9 @@ CMD ["nginx", "-g", "daemon off;"]
|
||||
# COPY /nginx.conf /etc/nginx/nginx.conf
|
||||
# EXPOSE 32166
|
||||
# CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
# FROM nginx:stable-alpine
|
||||
# COPY /dist /usr/share/nginx/html
|
||||
# COPY /nginx.conf /etc/nginx/nginx.conf
|
||||
# EXPOSE 32166
|
||||
# CMD ["nginx", "-g", "daemon off;"]
|
Loading…
x
Reference in New Issue
Block a user