Skip to content

Docker image for running Mozilla IoT Gateway

License

Notifications You must be signed in to change notification settings

mowi22/gateway-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Mozilla WebThings Gateway

Docker image based on Debian Stretch for running the Mozilla WebThings 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

About

Docker image for running Mozilla IoT Gateway

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 86.6%
  • Shell 13.4%