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 af950c1 commit c0c1581
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ Dockerfile
gruntfile.js
HWIMO-*
LICENSE
node_modules/
README.md
spec/
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@

FROM rackhd/on-core

RUN mkdir -p /RackHD/on-dhcp-proxy
COPY . /RackHD/on-dhcp-proxy/
WORKDIR /RackHD/on-dhcp-proxy

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-dhcp-proxy/
RUN cp -a -f /tmp/node_modules /RackHD/on-dhcp-proxy/

EXPOSE 68/udp
EXPOSE 4011

EXPOSE 68/udp 4011
CMD [ "node", "/RackHD/on-dhcp-proxy/index.js" ]

0 comments on commit c0c1581

Please sign in to comment.