Installing MagicMirror in a Docker container
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.
@savona how do you update mm in docker?
Assuming you’re running the container as per instruction on the magicmirror website and have stored the config and modules on the filesystem of your host.
- Stop the running container.
- Remove the container
- Pull the new version from docker hub.
- Start the container using the new version.
So assuming you’ve used the command as instructed on the website:
docker run -d
Updating to the latest version can be done by:
- docker stop magic_mirror
- docker container rm -v magic_mirror
- docker pull bastilimbach/docker-magicmirror
- docker run -d
I’ve however noticed, that although the Magic Mirror docker image is just a couple of days old, the Magic Mirror version within the container is over 2500 commits old. So apparently the daily update script is not updating the contents of the docker image on docker hub correctly (missing --no-cache option???). I’ve build a container myself using the associated Dockerfile on github and that results in a up to date version.
I would recommend making a backup of you’re config and modules folder, just to be on the safe side.
Using the above method, the old image is still available, so you could easily revert back to the old image, if required. You can remove that image using the ‘docker image rm’ command.
@savona Thank you very much! It works for me.