Gateways NIOT-E-TIJCX-GB-xx by design are Docker hosts only. Isn't there a method turning them into a container development platform nevertheless?

Gateways NIOT-E-TIJCX-GB-xx by design are Docker hosts only. Isn't there a method turning them into a container development platform nevertheless?

Q

Gateways NIOT-E-TIJCX-GB-xx by design are Docker hosts only. Isn't there a method turning them into a container development platform nevertheless?

A

Yes there is. We wouldn't call this possibility a "hack" since this attribute we are making use of is officially documented here and well-known, but taking advantage of it makes the gateway extremely vulnerable against hacks as long as expose. It should be activated for ongoing developments only and stopped/removed afterwards.

What we make use of is the circumstance that a Docker daemon offers a unix domain socket interface for controlling it from remote. You can expose this socket as mapped volume to a container and hence get access to the gateway's Docker within the container. The interesting thing about it now is that in this container you can install Docker a second time. It seems running isolated there which is indeed true, but since the gateway's daemon socket has been mapped into it, all your Docker commands called in the container are directed to the gateway's main Docker daemon instead with full access.

The following picture illustrates how the different software components will operate with each other:

draw.io Diagram is only supported by the cloud editor

Because Forge macros arent supported by the legacy editor, you'll need to convert this content to the cloud editor to display this macro properly. Find out more about converting to the cloud editor

Once the "Docker-in-a-Container" image has been started in a container you can control the main Docker Daemon Socket from now on. You can start/stop/build/commit ... you can do anything you want with the main Docker.

Since we do not disclose a secret at this point we didn't hesitate to offer a container image coming with Ubuntu OS, SSH and Docker here ready made for you to deploy on your NIOT-E-TIJCX-GB-x gateway. Follow the readme file and within 5 minutes you turn your gateway into a container image development platform.