Permalink
Browse files

Tweak Dockerfile (#248)

1. using npm run dashboard to generate bundles/dashboard.bundle.js
2. shrink docker image size
  • Loading branch information...
1 parent fbb64f7 commit e64d0c0b214f348d034d216f9d763a584c915231 Kakashi Liu committed with drew-gross Apr 14, 2016
Showing with 9 additions and 5 deletions.
  1. +9 −5 Dockerfile
View
@@ -1,6 +1,10 @@
-FROM node:4.3.2
-ADD package.json /src/package.json
-RUN cd /src && npm install
-ADD . /src
+FROM node:4.4.2
WORKDIR /src
-ENTRYPOINT ["npm", "start", "--"]
+ADD . /src
+RUN cd /src \
+ && npm install \
+ && npm run build \
+ && npm cache clear \
+ && rm -rf ~/.npm \
+ && rm -rf /var/lib/apt/lists/*
+ENTRYPOINT ["npm", "run", "dashboard"]

0 comments on commit e64d0c0

Please sign in to comment.