Merge pull request #856 from bastilimbach/develop

Outsource Dockerfiles
This commit is contained in:
Michael Teeuw 2017-04-19 21:45:42 +02:00 committed by GitHub
commit efb592dce5
5 changed files with 4 additions and 111 deletions

View File

@ -1,72 +0,0 @@
# Various Node ignoramuses.
logs
*.log
npm-debug.log*
pids
*.pid
*.seed
lib-cov
coverage
.grunt
.lock-wscript
build/Release
node_modules
jspm_modules
.npm
.node_repl_history
# Various Windows ignoramuses.
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
*.lnk
# Various OSX ignoramuses.
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Various Linux ignoramuses.
.fuse_hidden*
.directory
.Trash-*
# Various Magic Mirror ignoramuses and anti-ignoramuses.
# Don't ignore the node_helper core module.
!/modules/node_helper
!/modules/node_helper/**
# Ignore all modules except the default modules.
/modules/**
!/modules/default/**
# Ignore changes to the custom css files.
/css/custom.css
# Ignore unnecessary files for docker
CHANGELOG.md
LICENSE.md
README.md
Gruntfile.js
.*

View File

@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [2.1.2] - Unreleased ## [2.1.2] - Unreleased
### Changed ### Changed
- Revert Docker related changes in favor of [docker-MagicMirror](https://github.com/bastilimbach/docker-MagicMirror). All Docker images are outsourced. ([#856](https://github.com/MichMich/MagicMirror/pull/856))
- Change Docker base image (Debian + Node) to an arm based distro (AlpineARM + Node) ([#846](https://github.com/MichMich/MagicMirror/pull/846)) - Change Docker base image (Debian + Node) to an arm based distro (AlpineARM + Node) ([#846](https://github.com/MichMich/MagicMirror/pull/846))
- Fix the dockerfile to have it running from the first time. - Fix the dockerfile to have it running from the first time.

View File

@ -1,27 +0,0 @@
FROM izone/arm:node
# Set env variables
ENV NODE_ENV production
ENV MM_PORT 8080
WORKDIR /opt/magic_mirror
# 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
# 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"]

View File

@ -59,7 +59,7 @@ docker run -d \
--volume ~/magic_mirror/config:/opt/magic_mirror/config \ --volume ~/magic_mirror/config:/opt/magic_mirror/config \
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \ --volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
--name magic_mirror \ --name magic_mirror \
michmich/magicmirror bastilimbach/docker-magicmirror
``` ```
| **Volumes** | **Description** | | **Volumes** | **Description** |
@ -75,6 +75,8 @@ var config = {
}; };
``` ```
If you want to run the server on a raspberry pi, use the `raspberry` tag. (bastilimbach/docker-magicmirror:raspberry)
#### Manual #### Manual
1. Download and install the latest Node.js version. 1. Download and install the latest Node.js version.

View File

@ -1,11 +0,0 @@
#!/bin/sh
if [ ! -f /opt/magic_mirror/modules ]; then
cp -Rn /opt/magic_mirror/unmount_modules/. /opt/magic_mirror/modules
fi
if [ ! -f /opt/magic_mirror/config ]; then
cp -Rn /opt/magic_mirror/unmount_config/. /opt/magic_mirror/config
fi
node serveronly