Docker image for running Mozilla IoT Gateway
Switch branches/tags
Nothing to show
Clone or download
rzr and mrstegeman docker-compose: Remove volume as not needed (#10)
Observed issue was:

    web_1  | mkdir: cannot create directory \
    '/home/node/.mozilla-iot/log': Permission denied

It was verified on node:10-stretch base with:
docker-common-1.10.3-55.gite03ddb8.fc24.armv7hl

Change-Id: Iddc6f8487c80955ce4185cb4f1f9073237e6518e
Signed-off-by: Philippe Coval <p.coval@samsung.com>
Latest commit 94b1465 Sep 29, 2018

README.md

Docker Mozilla IoT Gateway

Docker image based on Debian Stretch for running the Mozilla IoT Gateway.

Compatibility

While the gateway doesn't necessarily require full local network access, some add-ons may. Therefore, it is best to run with the --net=host flag. Currently, this flag will not work when using Docker for Mac or Docker for Windows due to this and this.

Usage

AMD64

  • On Linux:

    docker run \
        -d \
        --rm \
        -v /path/to/shared/data:/home/node/.mozilla-iot \
        --net=host \
        --name mozilla-iot-gateway \
        mozillaiot/gateway:latest
  • On Windows or macOS:

    docker run \
        -d \
        --rm \
        -p 8080:8080 \
        -p 4443:4443 \
        -v /path/to/shared/data:/home/node/.mozilla-iot \
        --name mozilla-iot-gateway \
        mozillaiot/gateway:latest

ARM (e.g. Raspberry Pi)

Tested on Raspberry Pi 3 Model B/B+:

docker run \
    -d \
    --rm \
    -v /path/to/shared/data:/home/node/.mozilla-iot \
    --net=host \
    --name mozilla-iot-gateway \
    mozillaiot/gateway:arm

Parameters

  • -d - Run in daemon mode (in the background)
  • --rm - Remove the container after it stops
  • -v /path/to/shared/data:/home/node/.mozilla-iot - Change /path/to/shared/data to some local path. It will be used to store the "user profile", i.e. add-ons, logs, configuration data, etc.
  • --net=host - Shares host networking with containeri (highly recommended)
  • -p 8080:8080 / -p 4443:4443 - Forward necessary ports to the container
  • --name mozilla-iot-gateway - Name of the container

Connecting

After running the container, you can connect to it at: http://<host-ip-address>:8080

Building

If you'd like to build an image yourself, run the following:

git clone https://github.com/mozilla-iot/gateway-docker
cd gateway-docker
docker build -t gateway .
docker run \
    -d \
    --rm \
    -v /path/to/shared/data:/home/node/.mozilla-iot \
    --net=host \
    --name mozilla-iot-gateway \
    gateway