I had a need to run MagicMirror in server mode in a docker container to do some testing. Since I am fairly new to docker I had to do a lot of google searching to get everything working (especially the volumes and networking). I wrote this how-to to guide you through the docker install process, pulling and running the MagicMirror image, and basic configuration. I hope someone finds it useful.
Posts made by savona
Installing MagicMirror in a Docker container
Using a PIR sensor to turn off the monitor
I wrote this tutorial up after I got my PIR sensor working and though it might help some folks. If not admins can feel free to delete this thread.
MM Starts before network is up
I am using pm2 and it’s startup scripts to start MM on boot on my pi 3. I tried several different ordering techniques including:
[Unit] Description=PM2 process manager Documentation=https://pm2.keymetrics.io/ Wants=network-online.target After=network.target network-online.target .... [Install] WantedBy=multi-user.target network-online.target
For some reason nothing works and I keep getting auth errors on my modules and a constant Loading text in my calendar.
I resorted to writing this in my MM startup script to wait for a ping:
((count = 100)) while [[ $count -ne 0 ]] ; do ping -c 1 22.214.171.124 rc=$? if [[ $rc -eq 0 ]] ; then ((count = 1)) fi ((count = count - 1)) done if [[ $rc -eq 0 ]] ; then cd ~/MagicMirror DISPLAY=:0 npm start fi
Anyone else have any ideas?
RE: 2318 commits behind...
but I saw that the originator of the docker image said it was updated daily with a cronjob on this post:
2318 commits behind...
I recently installed MM with docker using this image:
It ran fine for a couple of days then yesterday I received this meesage:
MagicMirror2 update available.
The current installation is 2318 commits behind on the master branch.
My current version is:
grep version package.json "version": "2.5.0"
I have done a lot of searching. I have read that there is a cron job that updates the image for docker, but I have rebuilt several times and still no luck and I don’t see any changes on the docker git.
I have tried git pull and get error after error.
error: Your local changes to the following files would be overwritten by merge: package-lock.json vendor/package-lock.json Please commit your changes or stash them before you merge. error: The following untracked working tree files would be overwritten by merge: modules/default/clock/clock_screenshot.png modules/default/compliments/compliments_screenshot.png modules/default/currentweather/weather_screenshot.png modules/default/newsfeed/newsfeed_screenshot.png modules/default/weather/README.md modules/default/weather/current.njk modules/default/weather/current.png modules/default/weather/forecast.njk modules/default/weather/forecast.png modules/default/weather/providers/README.md modules/default/weather/providers/darksky.js modules/default/weather/providers/openweathermap.js modules/default/weather/weather.css modules/default/weather/weather.js modules/default/weather/weatherobject.js modules/default/weather/weatherprovider.js modules/default/weatherforecast/forecast_screenshot.png Please move or remove them before you merge. Aborting