Skip to content

Commit

Permalink
Remove layers and fix npm install of vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersigler committed Apr 4, 2017
1 parent 1a2b4f8 commit 6e33e06
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
FROM node:latest

RUN apt-get update && apt-get -y install dos2unix

ENV NODE_ENV production
ENV MM_PORT 8080
WORKDIR /opt/magic_mirror

COPY . .
COPY /modules unmount_modules
COPY /config unmount_config

ENV NODE_ENV production
ENV MM_PORT 8080

RUN npm install

RUN ["dos2unix", "docker-entrypoint.sh"]
RUN ["chmod", "+x", "docker-entrypoint.sh"]
RUN apt-get update \
&& apt-get -qy install tofrodos dos2unix \
&& chmod -R 777 vendor \
&& npm install \
&& cd vendor \
&& npm install \
&& cd .. \
&& dos2unix docker-entrypoint.sh \
&& chmod +x docker-entrypoint.sh

EXPOSE $MM_PORT
ENTRYPOINT ["/opt/magic_mirror/docker-entrypoint.sh"]

0 comments on commit 6e33e06

Please sign in to comment.