{"id":13493793,"url":"https://github.com/bastilimbach/docker-MagicMirror","last_synced_at":"2025-03-28T12:32:28.895Z","repository":{"id":20275338,"uuid":"88432220","full_name":"bastilimbach/docker-MagicMirror","owner":"bastilimbach","description":"Docker image for the Magic Mirror 2 project by Michael Teeuw.","archived":false,"fork":false,"pushed_at":"2022-01-07T21:44:07.000Z","size":89,"stargazers_count":188,"open_issues_count":11,"forks_count":54,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-20T05:44:57.466Z","etag":null,"topics":["docker","dockerfile","magicmirror","magicmirror-server","raspberrypi"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/bastilimbach/docker-magicmirror/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bastilimbach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-16T17:50:14.000Z","updated_at":"2025-03-01T15:46:58.000Z","dependencies_parsed_at":"2022-08-07T09:16:00.278Z","dependency_job_id":null,"html_url":"https://github.com/bastilimbach/docker-MagicMirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastilimbach%2Fdocker-MagicMirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastilimbach%2Fdocker-MagicMirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastilimbach%2Fdocker-MagicMirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastilimbach%2Fdocker-MagicMirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bastilimbach","download_url":"https://codeload.github.com/bastilimbach/docker-MagicMirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246030716,"owners_count":20712425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dockerfile","magicmirror","magicmirror-server","raspberrypi"],"created_at":"2024-07-31T19:01:18.854Z","updated_at":"2025-03-28T12:32:23.887Z","avatar_url":"https://github.com/bastilimbach.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![MagicMirror²: The open source modular smart mirror platform. ](https://github.com/MichMich/MagicMirror/raw/master/.github/header.png)](https://github.com/MichMich/MagicMirror)\n\n**MagicMirror²** is an open source modular smart mirror platform. With a growing list of installable modules, the **MagicMirror²** allows you to convert your hallway or bathroom mirror into your personal assistant.\n\n[![DockerHub Badge](https://dockeri.co/image/bastilimbach/docker-magicmirror)](https://hub.docker.com/r/bastilimbach/docker-magicmirror/)\n\n# Why Docker? [![Build Status](https://travis-ci.org/bastilimbach/docker-MagicMirror.svg?branch=master)](https://travis-ci.org/bastilimbach/docker-MagicMirror)\n\nIn some cases, you want to start the application without an actual app window. In this case, you can start MagicMirror² in server only mode by manually running `node serveronly` or using Docker. This will start the server, after which you can open the application in your browser of choice.\n\n# Tags\n\n- `latest` - The [latest stable release](https://github.com/MichMich/MagicMirror/releases/latest) of MagicMirror.\n- `develop` - Image based on the [`develop`](https://github.com/MichMich/MagicMirror/tree/develop) branch.\n- `vX.Y.Z`- Specific MagicMirror release. Take a look at the [releases](https://github.com/MichMich/MagicMirror/releases) page in the MagicMirror repository to get the correct version number.\n\n\u003e The respective docker images are getting updated daily by a cron job from Travis CI.\n\n# Run MagicMirror² in server only mode\n\nAfter a successful [Docker installation](https://docs.docker.com/engine/installation/) you just need to execute the following command in the shell:\n\n```bash\ndocker run  -d \\\n    --publish 80:8080 \\\n    --restart always \\\n    --volume ~/magic_mirror/config:/opt/magic_mirror/config \\\n    --volume ~/magic_mirror/modules:/opt/magic_mirror/modules \\\n    --volume /etc/localtime:/etc/localtime:ro \\\n    --name magic_mirror \\\n    bastilimbach/docker-magicmirror\n```\n\n# Environment variables\nEnvironment variables can be passed to the docker container using the `--env` flag.\n\n| **Variable** | **Description** |\n| --- | --- |\n| `TZ` | Let the environment variable TZ reflect the time zone. Without the correct time zone the MagicMirror² calendar or other modules might show the wrong time of an event. Find you time zone here \u003chttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones\u003e   |\n\n# Volumes\n\n| **Volume** | **Description** |\n| --- | --- |\n| `/opt/magic_mirror/config` | Mount this folder to insert your own config into the docker container. If the folder is empty the container will create a default configuration which can be adapted to you likings. |\n| `/opt/magic_mirror/modules` | Mount this folder to add your own custom modules into the docker container. If the folder is empty the container will copy the [default modules](https://github.com/MichMich/MagicMirror/tree/master/modules/default) from the MagicMirror² repository into the volume. |\n| `/opt/magic_mirror/css/custom.css` | Mount this file to add your own custom css into the docker container. \u003cbr\u003e\u003cbr\u003e **Important:** You need to create the file before you run the container. Otherwise Docker will create a `custom.css` folder. |\n| `/etc/localtime:/etc/localtime:ro` | Add this to syncronize the time of the host with the docker container. \u003cbr\u003e\u003cbr\u003e **Important:** This is for linux hosts. If you run your docker on other OS, you will need to change this. |\n\n# Build arguments\n\n| **Build variable** | **Description** |\n| --- | --- |\n| `branch` | Specify a branch or tag of the [MagicMirror repository](https://github.com/MichMich/MagicMirror) which should be used for building the image. Default: `master` |\n\n# Config\n\nIf you start the container without providing a custom configuration it will create a default config inside the `config` volume if it is empty.\nThis config can then be adapted to your likings.\n\nTo keep passwords and API secrets out of the config file add `.template` as extension to the config file (`config.js.template`) and use shell variable syntax (`${MY_API_TOKEN}`) as placeholder for your secrets in the config file.\nDon't forget to pass the template variables as environment to the container.\nFor example: `--env MY_API_TOKEN=secret-token`\nor in docker compose file:\n```yml\n    environment:\n      - MY_API_TOKEN=secret-token\n```\n\nIf you want to build the configuration by yourself be sure to set the following configuration properties accordingly:\n\n```javascript\nvar config = {\n    address: \"0.0.0.0\", // Needs to be \"0.0.0.0\" to make MagicMirror listen on any interface.\n    port: 8080, // If you change the port, be sure to also adapt the \"--publish\" flag in your docker run command. e.g: --publish 80:3000\n    ipWhitelist: [] // This is required to allow all IP addresses to access MagicMirror. Can also be set to the docker subnet.\n}\n```\n\n# Docker compose\n\nIf docker-compose is your game, here is an example of such.\nIt will publish the MagicMirror² server on port 8888.\n\n```yml\nversion: '3'\nservices:\n  magicmirror:\n    container_name: magicmirror\n    image: bastilimbach/docker-magicmirror\n    restart: unless-stopped\n    volumes:\n      - /etc/localtime:/etc/localtime:ro\n      - ~/magic_mirror/config:/opt/magic_mirror/config\n      - ~/magic_mirror/modules:/opt/magic_mirror/modules\n    ports:\n      - 8888:8080\n```\n\n## Remarks\n\n**Time zones**\n\nWhen it comes to time and time zones, MagicMirror² and the individual modules might use these differently.\nThe device that presents the generated page must have the correct time and time zones settings as well. The MagicMirror² default clock uses the local device's time zone to render the time.\n\nE.g: If you use a Raspberry Pi to show the generated result of the MagicMirror² docker, set the time zone on the RPi with\n\n```bash\nsudo raspi-config\n```\n\nand choose 'Localisation options'\n\n# Contribution\n\nI'm happy to accept Pull Requests! Please note that this project is released with a [Contributor Code of Conduct](https://github.com/bastilimbach/docker-MagicMirror/blob/master/.github/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.\n\n# License\n[MIT](https://github.com/bastilimbach/docker-MagicMirror/blob/master/LICENSE) ❤️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastilimbach%2Fdocker-MagicMirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbastilimbach%2Fdocker-MagicMirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastilimbach%2Fdocker-MagicMirror/lists"}