updated build to intermediate docker build container
This commit is contained in:
parent
123d7a9fe4
commit
61ca707300
|
|
@ -3,12 +3,6 @@ type: docker
|
||||||
name: Blog build and release
|
name: Blog build and release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
|
||||||
image: node:alpine
|
|
||||||
commands:
|
|
||||||
- npm install
|
|
||||||
- npx gatsby build
|
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
|
|
||||||
13
Dockerfile
13
Dockerfile
|
|
@ -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
|
FROM gatsbyjs/gatsby
|
||||||
COPY --from=gatsby-build /app/public /pub
|
COPY --from=build /app/public /pub
|
||||||
Loading…
Reference in New Issue