Restart of Docker container installs invalid modules for Maker Edition

I am running Ignition 8.1.10 Maker Edition in a Docker container. I am using the official image from Inductive Automation “inductiveautomation/ignition:latest”. On initial creation and start of the container for Maker Edition I see 15 modules installed and no errors.

image

Good so far, but if I stop the container and restart it I see this.

image

So on the restart of my container, invalid modules for Maker Edition get installed. I am confused as to how this is happening.

Here is my Docker Compose file.

version: '3.4'

services:
  gateway:
    image: inductiveautomation/ignition:latest   # You can change `latest` to a specific version, e.g. `8.0.5`
    ports:
      - 9043:8043
      - 9088:8088
    container_name: ignition-test
    volumes:
      - type: volume
        source: gw_data
        target: /usr/local/bin/ignition/data
    environment:
       ACCEPT_IGNITION_EULA: Y
       GATEWAY_ADMIN_USERNAME: admin
       GATEWAY_ADMIN_PASSWORD_FILE: /run/secrets/gateway-admin-password
       IGNITION_EDITION: maker
       TZ: UTC  # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

    secrets:
            - gateway-admin-password
    command: >
            -n APB-MakerEdition_IA
            -m 4096
            --
            wrapper.java.initmemory=512
            -Dignition.allowunsignedmodules=true

  db:
    image: mcr.microsoft.com/mssql/server:2019-latest
    ports:
      # Note that the 1433 port doesn't need to be published here for the gateway container to connect, 
      # only for external connectivity to the database.
      - 1433:1433
    container_name: sql-server-db
    volumes:
      - type: volume
        source: db_data
        target: /var/opt/mssql
      - type: bind
        source: ./db-backups
        target: /backups
      - type: bind
        source: ./db-init
        target: /docker-entrypoint-initdb.d
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

    env_file:
        - ./envFile/MSSQL/Settings.env
        - ./envFile/MSSQL/SA_Password.env
        
secrets:
  gateway-admin-password:
    file: secrets/GATEWAY_ADMIN_PASSWORD
        
volumes:
  db_data:
  gw_data:

Am I doing doing something wrong? Or is there another environment variable that needs to be set?

I have not experienced this with the image maintained by Kevin Collins. I was trying to use the official image from Inductive Automation.

@andrew.brauer , thank you for reaching out. You’re not doing anything wrong–this is a known issue at the moment. To clarify a little bit, you’ll see the behavior you describe when you remove and re-create the container (which may happen quite easily if you’re using Docker Swarm (not sure if you are, but just guessing based on the secrets: usage in your compose YAML)). A simple stop/start of a container will retain the Maker-only modules. Unfortunately, since the non-Maker modules are only removed during the commissioning phase, a recreation of the container (even with a bound data volume) will result in those modules showing up again (since they’re still part of the base image).

Ultimately, the solution here will be part of a broader improvement for third-party module support that we’re still incubating for the official image.

If you’d like to workaround this issue in the meantime, there are some options. The easiest method is to build your own derived image with those modules removed. You can integrate this into your Docker Compose YAML through the build: directive (where image: will then apply the value as a tag to the built image).

I’ve attached an example that will help workaround this issue.

forum-50861.zip (3.7 KB)

Hope this helps!

2 Likes

@kcollins1, I tried your workaround and it worked. I liked how your workaround modified the image.

Thanks for your help. :smiley: