New installed module in Ignition 8.1.5 docker container is gone after container reboot

I am running ignition 8.1.5 in docker on MacOS Mojave, with a named volume attached to /usr/local/bin/ignition/data within the container.

Today I was successfully installed MQTT distributor module, however this module go away after container reboot, I guess attach /usr/local/bin/ignition/data folder is not enough, any workaround?

Modules are located in /usr/local/bin/ignition/user-lib/modules/ by default.

It’s works, it would be wonderful to update the doc in docker hub as well (Docker Hub)

We have a ticket in the works for better support of third-party modules in a container. Currently the system locates all modules at /usr/local/bin/ignition/user-lib/modules/, like @PGriffith mentioned. Choosing the /usr/local/bin/ignition/data/ path for your named volume is the correct strategy for preserving gateway state. The user-lib/modules should stay “with” the image (of version 8.1.5, for example) so that you can upgrade your deployment by just swapping image versions (and keeping your data volume).

The best method right-now is to bind-mount the module directly into /usr/local/bin/ignition/user-lib/modules. See the example screenshot below:

Once you start your container with this setup, you’ll then need to go to the gateway webpage (Config->Modules) and accept the EULA and certificate to conclude the module installation. The good news is that with this strategy, you can still upgrade to newer versions by just stopping/removing this container, and starting a newer one (such as inductiveautomation/ignition:8.1.7) in its place against the same data volume.

Another alternative is to build your own derived image where you’ve copied that module into place. Then upgrading would simply be a matter of changing the FROM directive in the Dockerfile and then rebuilding your image, and then relaunching your container (again, still using your data volume).

2 Likes