• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Installing MagicMirror in a Docker container

Scheduled Pinned Locked Moved Tutorials
4 Posts 4 Posters 9.8k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    savona
    last edited by Jan 18, 2019, 6:39 PM

    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.

    https://www.putorius.net/2019/01/testing-magic-mirror-running-in-docker.html

    B D 2 Replies Last reply Apr 3, 2019, 11:42 PM Reply Quote 3
    • B Offline
      bachoo786 @savona
      last edited by Apr 3, 2019, 11:42 PM

      @savona how do you update mm in docker?

      1 Reply Last reply Reply Quote 0
      • J Offline
        jorgh6
        last edited by Apr 9, 2019, 8:40 PM

        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.

        1. Stop the running container.
        2. Remove the container
        3. Pull the new version from docker hub.
        4. Start the container using the new version.

        So assuming you’ve used the command as instructed on the website:

        docker run -d
        –publish 80:8080
        –restart always
        –volume ~/magic_mirror/config:/opt/magic_mirror/config
        –volume ~/magic_mirror/modules:/opt/magic_mirror/modules
        –name magic_mirror
        bastilimbach/docker-magicmirror

        Updating to the latest version can be done by:

        1. docker stop magic_mirror
        2. docker container rm -v magic_mirror
        3. docker pull bastilimbach/docker-magicmirror
        4. docker run -d
          –publish 8080:8080
          –restart always
          –volume ~/magic_mirror/config:/opt/magic_mirror/config
          –volume ~/magic_mirror/modules:/opt/magic_mirror/modules
          –name magic_mirror
          bastilimbach/docker-magicmirror

        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.

        Kind regards,

        Jorg

        1 Reply Last reply Reply Quote 0
        • D Offline
          Doublefire.Chen @savona
          last edited by Nov 24, 2022, 6:26 AM

          @savona Thank you very much! It works for me.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy