Sign inSign up

ashokgoud/cal-web-2-multi

By ashokgoud

•Updated over 3 years ago

Image
0

26

ashokgoud/cal-web-2-multi repository overview

#####General Dockerfile #########

FROM node:14-alpine AS builder

WORKDIR /app

COPY *.json ./

COPY public ./public

COPY src ./src

RUN npm install

EXPOSE 3000

RUN npm build

CMD ["npm", "start"]

##source link: https://github.com/dealbisac/react-calculator⁠

MultiStage Dockerfile FROM node:14-alpine AS builder WORKDIR /app ENV NODE_ENV=prod

COPY *.json ./

COPY public ./public

COPY src ./src

ENV NODE_ENV=prod

RUN npm install

RUN yarn build

FROM nginx:1.21.0-alpine AS production ENV NODE_ENV=prod RUN rm -rf /usr/share/nginx/html/*

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

RUN ls -ltar /usr/share/nginx/html

COPY nginx/default.conf /etc/nginx/conf.d/

EXPOSE 80

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

Tag summary

Content type

Image

Digest

sha256:de397b8ed…

Size

9.5 MB

Last updated

over 3 years ago

docker pull ashokgoud/cal-web-2-multi:react