2021-04-15 11:47:59 +00:00
|
|
|
FROM node:current-alpine AS deps
|
|
|
|
|
|
|
|
RUN apk add --no-cache libc6-compat
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
FROM node:alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
|
|
RUN yarn build
|
|
|
|
|
2021-04-18 14:05:55 +00:00
|
|
|
FROM nginx AS runner
|
|
|
|
COPY --from=builder /app/out /usr/share/nginx/html
|
2021-04-15 11:47:59 +00:00
|
|
|
|
2021-04-18 14:05:55 +00:00
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|