diff --git a/.dockerignore b/.dockerignore index 2eac0dc..281e557 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ node_modules .git -.env \ No newline at end of file +.env diff --git a/Dockerfile b/Dockerfile index e02a15b..c7f2ff0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,21 @@ -FROM iojs:slim +FROM mhart/alpine-node MAINTAINER Jonathan Cremin -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 \ No newline at end of file +CMD ["npm", "start"]