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

Commit

Permalink
Merge pull request #231 from blockstack/fix/docker-file
Browse files Browse the repository at this point in the history
fix: dockerfile fixes
  • Loading branch information
aulneau authored Nov 30, 2020
2 parents be6fde9 + f512bf1 commit 85c8732
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
FROM node:12.14.1-alpine as base
WORKDIR /usr/src
COPY package.json yarn.lock /usr/src/
RUN yarn install
FROM node:alpine
COPY . .
RUN yarn build && \
yarn --production

FROM node:12.14.1-alpine
WORKDIR /usr/src
ENV NODE_ENV="production"
COPY --from=base /usr/src .
run apk --no-cache add --virtual native-deps \
g++ gcc libgcc libstdc++ linux-headers make python && \
npm install --quiet node-gyp -g &&\
yarn && \
apk del native-deps
ENV NODE_ENV production
RUN yarn build
RUN yarn cache clean
EXPOSE 3000
CMD ["node", "./server"]
CMD [ "yarn", "start" ]

0 comments on commit 85c8732

Please sign in to comment.