FROM node:14.3 as build
WORKDIR /app
COPY package.json ./
RUN yarn install
RUN yarn global add gatsby-cli
COPY . ./
RUN gatsby build
FROM gatsbyjs/gatsby
COPY --from=build /app/public /pub