Update Dockerfile to use alpine linux image

This commit is contained in:
Jonathan Cremin 2015-11-22 12:37:58 +00:00
parent 0be6450250
commit 8bd56dd731
2 changed files with 17 additions and 7 deletions

View file

@ -1,3 +1,3 @@
node_modules
.git
.env
.env

View file

@ -1,11 +1,21 @@
FROM iojs:slim
FROM mhart/alpine-node
MAINTAINER Jonathan Cremin <jonathan@crem.in>
ADD package.json package.json
RUN npm install
COPY . .
WORKDIR /app
RUN apk add --update make gcc g++ python git
COPY package.json package.json
RUN npm install
RUN apk del make gcc g++ python git && \
rm -rf /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp
COPY . .
RUN npm run build
RUN npm run build
EXPOSE 3000
CMD npm start
CMD ["npm", "start"]