This provides the container description for the mozilla-iot-gateway
The following needs to be installed on your development system: - podman
To create the mozilla-iot-gateway-container image use
podman build -f Dockerfile -t mozilla-iot-gateway .
In order for this to work you have to be in the directory of the dockerfile.
To allow mounting of a directory from an running container we have to set the selinux permission in such a way that this is allowed. This is done using the following command
chcon -Rt svirt_sandbox_file_t /mozilla-iot
With this command we can mount the folder
/mozilla-iot in the container.
If we don't do this we get a persmission denied error.
Use the following command to run the image for testing purposes:
podman run --rm -it mozilla-iot-gateway /bin/bash podman run --rm -it -p 8080:8080 -v /mozilla-iot:/root/.mozilla-iot/:rw mozilla-iot-gateway /bin/bash
To test if everything works open your browser of choice and go
to the URL:
http:localhost:8080. Note that the path to the volume
needs to provides in an absolute way, both inside and outside of the
Use the following command to run the image and access the gateway from outside
podman run -d -p 8080:8080 mozilla-iot-gateway
This will provide you with an container <id> which you can use with the following command to attach to the container
podman exec -t -i <ID> /bin/bash
To assign a name to the running container just modify the above command to
podman run -d -p 8080:8080 -v /mozilla-iot:/root/.mozilla-iot/:rw --name m-iot-gw1 mozilla-iot-gateway