Docker support for Monocle Gateway Environment Variables [IN PROGRESS]

  • Hello,

    first of all many thanks for the work you put into the local camera and Alexa theme.
    I was very happy that the Gateway is finally available as Docker Image, and that I can switch off a stand-alone solution again. Unfortunately the gateway forces a token to be under /etc/, but on the whole modern Docker operating system like CoreOS or ResinOS there is only one read-only filesystem left.
    I think it would be a good approach if you could set the token as an environment variable, this can be configured in the whole Docker GUIs like Portainer very easily during setup.

    Best regards

  • @pattyland

    I agree and am planning that for the next release. When I built this docker container, I was using the existing Monocle Gateway v0.0.4 which did not include support for the token as an environment variable. So we can add environment variable support to v0.0.5 in the next cycle.

    At some point, the Monocle Gateway is planned to include a web-based GUI, and I wonder if then an independent Docker volume may make more sense for persistent storage. Especially if there are other configuration options that can be edited/defined via the GUI.


    Thanks, Robert

  • @Monocle Ah of course this is something for the gateways service to provide and not the docker image, sorry for the confusion.

    Web-based GUI sounds great! And yes, a Docker volume for persistant date is much better than relying on bind mounts for backup, management, os independent etc…


  • What is the progress with version 0.0.5? I would really like to migrate my gateway to Docker 😛

  • @pattyland

    Sorry, v0.0.5 has been on hold while I tackle other commitments. So not much recent progress there.

    You could just create a docker volume for holding the config file (monocle.token, from /etc/monocle) so that the container is not mounting any writable path on your host, but the docker volume could persist your monocle config outside of the lifecycle of the container instances.

    In the interim … if there is anything you can do to the docker image to make the config better/easier, feel free to make changes to the Dockerfile and submit a pull request and I can include it in the image:


Log in to reply