Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
n-sviridenko committed Nov 30, 2019
1 parent e96b548 commit 9b3ec07
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:12-alpine

RUN apk add --no-cache tzdata

ONBUILD ARG NODE_ENV=development

RUN mkdir -p /usr/app
WORKDIR /usr/app

ONBUILD COPY --from=installer /usr/app/node_modules ./node_modules
ONBUILD COPY --from=builder /usr/app/lib ./lib
ONBUILD COPY package.json yarn.lock ./

ONBUILD COPY src ./src
ONBUILD RUN sh -c "if [ \"$NODE_ENV\" == \"production\" ]; then rm -rf src; fi"
ONBUILD ENV NODE_ENV=${NODE_ENV}

CMD ["yarn", "serve"]

0 comments on commit 9b3ec07

Please sign in to comment.