https://github.com/thirdgen88/ignition-derived-example
Derived Image Example using Official Ignition Docker Image as Base
https://github.com/thirdgen88/ignition-derived-example
Last synced: 5 months ago
JSON representation
Derived Image Example using Official Ignition Docker Image as Base
- Host: GitHub
- URL: https://github.com/thirdgen88/ignition-derived-example
- Owner: thirdgen88
- License: mit
- Created: 2022-08-04T20:33:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-16T15:08:57.000Z (about 1 year ago)
- Last Synced: 2025-03-16T15:46:02.118Z (about 1 year ago)
- Language: Shell
- Size: 5.35 MB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example Derived Image Solution for Ignition


This solution provides an example of how to implement a derived Ignition Docker image with the following features:
- Adding third-party modules such as MQTT Engine and Azure Injector.
- Bundling an integrated gateway backup.
- Setting default username and password of `default` built-in user source.
- Shimming the entrypoint script with a spot to introduce custom functionality to run prior to launching the gateway.
## How to Build
Before you get started, create a file called `gw-secrets/GATEWAY_ADMIN_PASSWORD` with the password that you want to associate with the `admin` user. There is special functionality built into the "prep" stage of the multi-stage build that updates the `default` user source from the built-in gateway backup with your desired baseline password. This is converted to a one-way salt+hash for storage in the gwbk.
There is a `docker-compose.yml` solution that can be used to build the image. You can build+run the image with:
```
docker compose up --build -d
```
> [!WARNING]
> The resultant gateway that will launch at http://localhost:8088 does **not** have a volume associated with it in order to assist with rapid testing of changes. Please add a volume definition to persist your gateway state data if you use this solution outside of testing the derived image build!
If you want to build the image with `docker build`, you can use something like the command below:
```
docker build \
--build-arg IGNITION_VERSION=8.1.47 \
--build-arg SUPPLEMENTAL_MODULES="mqttdistributor mqttengine mqtttransmission" \
--secret id=gateway-admin-password,src=gw-secrets/GATEWAY_ADMIN_PASSWORD \
-t myimage:mytag \
gw-build
```