# \[BUG\] Docker image: installed modules dissapear whenever we create new container

**URL:** <https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 19, 2022, 8:46am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157 "2022-01-19T08:46:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [January 19, 2022, 8:46am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/1 "2022-01-19T08:46:59Z")

</div>

Hi,

We have been using the Ignition Docker images, and it’s been great to use them.

However, there is one issue we want to highlight. We have installed the container just like the [manual](https://docs.inductiveautomation.com/display/DOC81/Docker+Image) suggests, with volume in place.

With that volume, we manage to save almost every data on our gateway, except for one thing, the installed modules.

The modules always reset to the default installation modules.  
So f.e. we also have the MQTT Engine module, but when we create a new container with our stored Volume, de MQTT Engine is not installed anymore. Also modules we don’t use and where uninstalled, are back. When we install MQTT Engine module again, all our module settings are being restored though.

Is there another volume we should create? Or is this something IA is aware of and is fixing?  
We found it strange that nothing of this was documented.

Jasper

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 19, 2022, 11:33am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/2 "2022-01-19T11:33:05Z")

</div>

I believe it’s something being worked on.

> [@Specifying Modules on Gateway Docker Compose](https://forum.inductiveautomation.com/t/specifying-modules-on-gateway-docker-compose/50361/3):
>
> @Kevin.Herron beat me to it. We’ve chosen not to implement the solution used by kcollins/ignition image since even it has some nuance that we’d like to be a little cleaner for the official image (regarding managing modules from the gateway webpage being one aspect that comes to mind). That is the reason it is still “incubating”–we want to make sure we get this behavior right and ensure that all aspects work smoothly. The good news is that if you don’t want to wait, you can customize via a der…

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [January 19, 2022, 12:29pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/3 "2022-01-19T12:29:02Z")

</div>

Ok nice!

---

<div class="post-metadata">

**Author:** ![andrew.brauer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.brauer/32/34853_2.png) [@andrew.brauer](https://forum.inductiveautomation.com/u/andrew.brauer)\
**Post date:** [January 19, 2022, 2:23pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/4 "2022-01-19T14:23:24Z")

</div>

I had the same problem but I was able to get around it by updating my Docker compose file to copy the external modl file into the container. This is what I did…

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b3639bbde96cac55d8661fcae4e1e8479b590611.png)

If you look at my Docker compose file you will notice this snippet:

```auto
   - type: bind
        source: external-modules/ApexCharts-signed.modl
        target: /usr/local/bin/ignition/user-lib/modules/ApexCharts-signed.modl

```

This copies the module file from my host into the container. It works, I can see the Apex Charts module in the my Docker container after any restart or creation of the container.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [January 20, 2022, 8:04am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/5 "2022-01-20T08:04:53Z")

</div>

Cool, thanks for your reply!

---

<div class="post-metadata">

**Author:** ![cniemuth](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@cniemuth](https://forum.inductiveautomation.com/u/cniemuth)\
**Post date:** [July 22, 2023, 12:22am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/6 "2023-07-22T00:22:36Z")

</div>

Hey All,  
I know this is an older thread but one of the last comments from 2022 states that this is being worked on as a possible feature, maybe. Does anyone know if this has been released? I am using Azure IoT Hub to deploy a container (Azure calls it a Module). I can pass environment variables and adjust a runtime config with other settings like gateway name, jvm memory, port assignment, and volume persistence. However, when it comes to 3rd party modules, I have not found a way to do this. Full disclosure, the device I deploy to is essentially a black box, so I have to rely on my config from Azure to do all the work. So, I do not have the option of drilling in locally and running CLI to make any adjustments. Other than not being able to persist my 3rd party modules, this solution has been working really well.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 22, 2023, 12:41am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/7 "2023-07-22T00:41:57Z")

</div>

@kcollins can verify, but if the ticket I'm looking at is the right one, then no it hasn't been released. It looks like right now the target is to release this alongside Ignition 8.3, late next year.

---

<div class="post-metadata">

**Author:** ![cniemuth](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@cniemuth](https://forum.inductiveautomation.com/u/cniemuth)\
**Post date:** [July 22, 2023, 12:51am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/8 "2023-07-22T00:51:59Z")

</div>

Understood, thank you Kevin.

@kcollins any good advice on how I can accomplish this manually with my current setup? I will gladly share any information you would like and I am very open to suggestions. I am especially open to suggestions if the approach we are taking to deploy Ignition containers is not a great idea.

I can gladly take my thoughts to another thread if that is a better option to discuss this in more detail.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [July 22, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/9 "2023-07-22T15:25:15Z")

</div>

It is true that we're planning on reworking how modules can be loaded with the 8.3 container image. Currently, Ignition modules get installed in `user-lib/modules`, alongside the ones that are built into the image. This causes some complications with separating gateway state data (i.e. our `data` folder) from the image. If you install a third-party module through the web UI, then it gets placed in `user-lib/modules` and things will appear to be working fine until that container is replaced (i.e. from an upgrade or any number of other events that could happen within a given orchestrator (such as Azure IoT Edge Runtime)).

The best solution (and it is a perfectly fine one) is to utilize a derived image. I maintain some useful examples [here](https://github.com/thirdgen88/ignition-derived-example), but you don't necessarily need anything super-complex. You could do something as simple as with the following `Dockerfile`, for example:

```plaintext
FROM inductiveautomation/ignition:8.1.30

COPY --chown=ignition:ignition my-module-in-local-folder.modl ${IGNITION_INSTALL_LOCATION}/user-lib/modules/

# Optionally pre-load the set of built-in modules that will be enabled
# so they don't revert to the full set on container lifecycle events.
ENV GATEWAY_MODULES_ENABLED=enterprise-administration,logix-driver,opc-ua,perspective

```

Build and then push that image to a container registry (i.e. an Azure Container Registry for your IoT Edge deployments) and use that for your deployment configuration.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![cniemuth](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@cniemuth](https://forum.inductiveautomation.com/u/cniemuth)\
**Post date:** [July 24, 2023, 6:48pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/10 "2023-07-24T18:48:41Z")

</div>

Thank you for all of that useful information! I have been trying to learn container deployments, but things don't always click all the time in my head. I had felt pretty comfortable using Docker Desktop with yaml files but now that we moved to Azure IoT Hub its like I'm starting over. The way we built the deployment is to use/pull the Ignition image from docker hub and then pass in environment variables and runtime arguments. I have a few screenshots below that highlight this method. Are you suggesting that we can modify the runtime arguments to accomplish this or do a different route? Thanks in advance!

**Deployment Details:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/1945973891a8301e1b553265eab3d6286d1b74b9.png)

**IoT Edge Module Settings (ignition-gateway):**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b6f627a577388f687cf34c8ab30667db85a9533c.png)

**IoT Edge Module Env Variables (ignition-gateway):**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c0fb3614fde7c5b80c4317bec2543ef710bbfba3.png)

**IoT Edge Module Container Create Options (ignition-gateway):**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/8/a8f59c1b7932235e452da0a32c73cc4753d08f7e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/9/79cd84e5f3ec7d7bc575eafb8d0763871e931a00.png)

If there is anything else you would like to see, please let me know.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [July 24, 2023, 8:14pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/11 "2023-07-24T20:14:47Z")

</div>

> [@cniemuth](#):
>
> Thank you for all of that useful information!

You're welcome! See also [this ICC session](https://inductiveautomation.com/resources/icc/2022/running-ignition-in-a-container-environment) from last year for some more details on various aspects of interest.

> [@cniemuth](#):
>
> Are you suggesting that we can modify the runtime arguments to accomplish this or do a different route?

I'm suggesting that you'd use a different image URI than `docker.io/inductiveautomation/ignition:x.y.z`; one that has been customized with the additional [modl] files/configuration you need.

---

<div class="post-metadata">

**Author:** ![cniemuth](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@cniemuth](https://forum.inductiveautomation.com/u/cniemuth)\
**Post date:** [July 24, 2023, 8:23pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/12 "2023-07-24T20:23:55Z")

</div>

Ahhh, I see. I don't know if I am savvy enough to make a custom image (unless I am downplaying my knowledge of this technology). Would you recommend that I call up my IA Account Manager to get me in touch with an IA resource or should I reach out to an Ignition integrator? I know that IA usually has customers work with integrators on specific use cases and deployments but wasn't sure if this could be discussed on a broad enough level with IA Support.

---

<div class="post-metadata">

**Author:** ![Chris\_Kirby](https://avatars.discourse-cdn.com/v4/letter/c/7993a0/32.png) [@Chris\_Kirby](https://forum.inductiveautomation.com/u/Chris_Kirby)\
**Post date:** [January 15, 2024, 12:58am UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/13 "2024-01-15T00:58:47Z")

</div>

Hi,

I see this is an older thread and this question was asked last July, but is there an update on this? It is just that I am having the same problem.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [January 16, 2024, 3:17pm UTC](https://forum.inductiveautomation.com/t/bug-docker-image-installed-modules-dissapear-whenever-we-create-new-container/55157/14 "2024-01-16T15:17:48Z")

</div>

There are some efforts underway for improving third-party module support in the container image. However, for 8.1.x, the path forward is still as described above, a custom derived image with your third-party modules added in. Keep in mind that the `GATEWAY_MODULES_ENABLED` [environment variable](https://docs.inductiveautomation.com/display/DOC81/Docker+Image#DockerImage-EnvironmentVariables) is already there for defining which built-in modules you want to have loaded on container start.
