Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #563 from thomaseizinger/feature/docker-multistage…
Browse files Browse the repository at this point in the history
…-builds

Use Docker multistage builds for reduced imagesize
  • Loading branch information
mikeseese authored Aug 16, 2018
2 parents 4654c4c + 8d7a4cf commit 590b856
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mhart/alpine-node:8
FROM mhart/alpine-node:8 as builder

RUN apk add --no-cache make gcc g++ python git bash
COPY package.json /src/package.json
Expand All @@ -8,8 +8,14 @@ RUN npm install
ADD . .
RUN npm run build

FROM mhart/alpine-node:8 as runtime

WORKDIR /app
COPY --from=builder "/src/build/cli.node.js" "./cli.node.js"
COPY --from=builder "/src/build/cli.node.js.map" "./cli.node.js.map"

ENV DOCKER true

EXPOSE 8545

ENTRYPOINT ["node", "./build/cli.node.js"]
ENTRYPOINT ["node", "/app/cli.node.js"]

0 comments on commit 590b856

Please sign in to comment.