-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from bastilimbach/develop
Add the ability to use the docker image with a raspberry pi
- Loading branch information
Showing
4 changed files
with
22 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
FROM node:latest | ||
FROM izone/arm:node | ||
|
||
# Set env variables | ||
ENV NODE_ENV production | ||
ENV MM_PORT 8080 | ||
|
||
WORKDIR /opt/magic_mirror | ||
|
||
COPY . . | ||
COPY /modules unmount_modules | ||
COPY /config unmount_config | ||
# Cache node_modules | ||
COPY package.json /opt/magic_mirror | ||
RUN npm install | ||
|
||
# Copy all needed files | ||
COPY . /opt/magic_mirror | ||
|
||
# Save/Cache config and modules folder for docker-entrypoint | ||
COPY /modules /opt/magic_mirror/unmount_modules | ||
COPY /config /opt/magic_mirror/unmount_config | ||
|
||
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 | ||
# Convert docker-entrypoint.sh to unix format and grant execution privileges | ||
RUN apk update \ | ||
&& apk add dos2unix --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted \ | ||
&& dos2unix docker-entrypoint.sh \ | ||
&& chmod +x docker-entrypoint.sh | ||
|
||
EXPOSE $MM_PORT | ||
ENTRYPOINT ["/opt/magic_mirror/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters