Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/improve dockerfile #825

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [2.1.2] - Unreleased

### Changed
- Fix the dockerfile to have it running from the first time.

### Added
- Add in option to wrap long calendar events to multiple lines using `wrapEvents` configuration option.
Expand Down
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"]