updated build to intermediate docker build container

This commit is contained in:
Stephan Dörfler 2020-06-03 08:03:09 +02:00
parent 123d7a9fe4
commit 61ca707300
2 changed files with 11 additions and 8 deletions

View File

@ -3,12 +3,6 @@ type: docker
name: Blog build and release
steps:
- name: build
image: node:alpine
commands:
- npm install
- npx gatsby build
- name: docker
image: plugins/docker
settings:

View File

@ -1,4 +1,13 @@
FROM gatsbyjs/gatsby:onbuild as gatsby-build
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=gatsby-build /app/public /pub
COPY --from=build /app/public /pub