Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.34 KB

DOCKER.md

File metadata and controls

39 lines (23 loc) · 1.34 KB

Docker Image of iot-lab-gateway

The provided Dockerfile builds a Docker image that installs all the necessary dependencies listed in INSTALL.md, without you having to install them on the host machine.

The only prerequisite on the host before running the container for the first time is to install udev rules on the host, which is done with:

python setup.py udev_rules_install

Alternatively,

make setup-udev-rules
udevadm control --reload

The udev rules create a subdirectory /dev/iotlab which will be populated once a supported board is plugged.

For the following commands sudo might be needed depending on whether your user is in the docker group:

To build the image (need to be done only once, unless you modify the Dockerfile):

make build-docker-image

To run the image:

make BOARD={node_name} run

To specify a certain hostname, use the HOSTNAME variable

make HOSTNAME=custom-m3-00 BOARD=m3 run

To bind the server on a certain host or port:

make PORT=8081 HOST=0.0.0.0 HOSTNAME=custom-m3-00 BOARD=m3 run

By default the current working directory is bound inside the container and this is this code that is run. Be advised, the disadvantage is that some files might be created in the current working directory with root permissions (the user inside the Docker container)