Skip to content

Commit

Permalink
feat: update Dockerfile to reduce size
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Mar 19, 2021
1 parent d207bad commit 8d81af2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules
.git
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
FROM node:14-alpine
FROM node:14-alpine AS build
WORKDIR /phoenix
COPY . .
RUN npm install --global lerna
RUN yarn install:dependencies
CMD ["yarn", "start", "--", "--scope", "phoenix-ng", "--", "--host=0.0.0.0"]
RUN yarn deploy:web
# Delete all node_modules folders
RUN find . -name "node_modules" -type d -exec rm -rf "{}" +

FROM nginx:alpine
COPY --from=build /phoenix/packages/phoenix-ng/docs /usr/share/nginx/html

0 comments on commit 8d81af2

Please sign in to comment.