2019-10-12 14:14:35 +02:00
|
|
|
FROM node:12-slim as build
|
2019-07-07 23:09:35 +02:00
|
|
|
|
|
|
|
# Set work dir
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
# Copy package files
|
|
|
|
COPY package.json ./
|
|
|
|
COPY yarn.lock ./
|
|
|
|
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
FROM nginx:alpine as production-stage
|
|
|
|
|
|
|
|
RUN apk add curl --no-cache
|
|
|
|
|
|
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
|
|
|
|
COPY --from=build /app/dist .
|