Skip to content

Commit

Permalink
Merge pull request #42 from SheershBhatnagar/main
Browse files Browse the repository at this point in the history
chore(docker): Modified the Dockerfile
  • Loading branch information
1stdevfriend authored Dec 27, 2023
2 parents bfe5825 + 344dbd6 commit 8b017e7
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# Builder already added via Github Actions
# Uncomment for full workflow action
# FROM node:slim as build-stage
# ENV NODE_OPTIONS=--openssl-legacy-provider
# WORKDIR /app
# COPY package.json ./
# COPY package-lock.json ./
# COPY . .
# RUN npm ci --force
# RUN npm run build
# FROM nginx:stable-alpine
# COPY --from=build-stage /app/build/ /usr/share/nginx/html
# EXPOSE 80
# CMD ["nginx", "-g", "daemon off;"]
FROM node:16-slim as builder

FROM node:16-slim
WORKDIR /app
COPY build/ ./build/

COPY . .

RUN npm ci --force
RUN npm run build

FROM nginx:alpine-slim

COPY --from=builder /app/build/ /usr/share/nginx/html

EXPOSE 80
RUN npm install -g serve
CMD ["serve", "-s", "build", "-p", "80"]

CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 8b017e7

Please sign in to comment.