bastilimbach / docker-MagicMirror

Docker image for the Magic Mirror 2 project by Michael Teeuw.
https://hub.docker.com/r/bastilimbach/docker-magicmirror/
MIT License
185 stars 54 forks source link

The latest versions no longer working (MM inside Docker is fine) #31

Closed chris-kwl closed 4 years ago

chris-kwl commented 4 years ago

Hi, I can't get the container working in the latest versions, using Docker Desktop 2.1.0.5 (latest version) win64 (no other version tested).

When I try to access it, I get the following:

without Container/portsharing the errors are:

Inside the container MM is running correctly, tested with wget localhost:8080 and also the logs show no error either:

[...] [11:27:13.574] [LOG] Sockets connected & modules started ... [11:27:13.574] [LOG] Ready to go! Please point your browser to: http://localhost:8080

When i use an old version everything works (same configuration and default).

Working Image (30th dec):

Not working (for example):

Used command (working with old version):

docker run -d --publish 80:8080 --restart always --env TZ=Europe/Berlin --volume c:/magic_mirror/config:/opt/magic_mirror/config --volume c:/magic_mirror/modules:/opt/magic_mirror/modules --volume c:/magic_mirror/css:/opt/magic_mirror/css --name magic_mirror bastilimbach/docker-magicmirror

bastilimbach commented 4 years ago

Hi 👋 Can you please provide you config?

chris-kwl commented 4 years ago

Hi, thanks for replying :)

Which config do you mean exactly? The MM config?

For testing I have removed almost everything:

config.js ```javascript /* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: [], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "de", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left", config: { timezone: 'Europe/Berlin', } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} ```
custom.css ```css /***************************************************** * Magic Mirror * * Custom CSS * * * * By Michael Teeuw http://michaelteeuw.nl * * MIT Licensed. * * * * Add any custom CSS below. * * Changes to this files will be ignored by GIT. * *****************************************************/ body { } ```
Log ``` [19:42:01.716] [LOG] Starting MagicMirror: v2.10.0 [19:42:01.718] [LOG] Loading config ... [19:42:01.722] [LOG] Loading module helpers ... [19:42:01.724] [LOG] No helper found for module: alert. [19:42:01.738] [LOG] Initializing new module helper ... [19:42:01.739] [LOG] Module helper loaded: updatenotification [19:42:01.740] [LOG] No helper found for module: clock. [19:42:01.740] [LOG] All module helpers loaded. [19:42:01.741] [LOG] Starting server on port 8080 ... [19:42:01.743] [INFO] You're using a full whitelist configuration to allow for all IPs [19:42:01.745] [LOG] Server started ... [19:42:01.745] [LOG] Connecting socket for: updatenotification [19:42:01.745] [LOG] Sockets connected & modules started ... [19:42:01.746] [LOG] Ready to go! Please point your browser to: http://localhost:8080 ```
xbgmsharp commented 4 years ago

You need specify address: "0.0.0.0", to force to listen on all interfaces. https://github.com/xbgmsharp/docker-MagicMirror/commit/1fe37ada760db6bc391d492259c8cd65bae0f73d

chris-kwl commented 4 years ago

That's it, thank you! So MM after all... Quite strange, because it worked like this in the past and according to the documentary both should have the same function? But what the heck, thanks.

bastilimbach commented 4 years ago

Maybe a bug was introduced. Might need to adapt the readme. Thanks @xbgmsharp!

chris-kwl commented 4 years ago

Just tested it on a raspberry (not the docker version) and there is the same behavior. In the new published Documentation on the website not github only address: "0.0.0.0" is left.

I think more important than the readme is the mm-docker-config.js, because at the moment the container does not work by default.

Took the opportunity to create a Pull request #32 and gather some github experience.

bastilimbach commented 4 years ago

Thanks @chris-kwl for the PR. This is what open source is all about 🎉

Merged it!