diff --git a/.drone.yml b/.drone.yml index 7f84499..99722af 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: diff --git a/Dockerfile b/Dockerfile index 7cdae14..8e38477 100644 --- a/Dockerfile +++ b/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 -COPY --from=gatsby-build /app/public /pub \ No newline at end of file +COPY --from=build /app/public /pub \ No newline at end of file