Skip to content

Commit

Permalink
Dockerfile refactor removes extra node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Poulter, Roland authored and Poulter, Roland committed May 2, 2016
1 parent 053b24e commit 3cf12b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Dockerfile
Gruntfile.js
HWIMO-*
LICENSE
migrate.js
node_modules/
README.md
spec/
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@

FROM rackhd/on-core

RUN mkdir -p /RackHD/on-tftp
COPY . /RackHD/on-tftp/
WORKDIR /RackHD/on-tftp

COPY ./package.json /tmp/
RUN cd /tmp \
&& ln -s /RackHD/on-core /tmp/node_modules/on-core \
&& ln -s /RackHD/on-core/node_modules/di /tmp/node_modules/di \
RUN mkdir -p ./node_modules \
&& ln -s /RackHD/on-core ./node_modules/on-core \
&& ln -s /RackHD/on-core/node_modules/di ./node_modules/di \
&& npm install --ignore-scripts --production

COPY . /RackHD/on-tftp/
RUN cp -a -f /tmp/node_modules /RackHD/on-tftp/

EXPOSE 69/udp

VOLUME /RackHD/on-tftp/static/tftp

CMD [ "node", "/RackHD/on-tftp/index.js" ]

0 comments on commit 3cf12b1

Please sign in to comment.