Dockerfile 332 Bytes
Newer Older
John Doe's avatar
John Doe committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
FROM node:16.14.2-alpine as builder

WORKDIR /offshift

COPY . /offshift/

RUN npm install

RUN npm run build:prod

FROM nginx:1.21.6-alpine

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

RUN rm -rf /usr/share/nginx/html/*

COPY --from=builder /offshift/dist /usr/share/nginx/html

EXPOSE 8080

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