# Ignition under Docker Usage Examples

**URL:** <https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126>\
**Category:** Ignition\
**Created:** [January 25, 2019, 6:18pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126 "2019-01-25T18:18:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [January 25, 2019, 6:18pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/1 "2019-01-25T18:18:01Z")

</div>

As some folks know, I’ve been working to make Ignition work nicely under Docker for some time through my efforts at [ignition-docker](https://github.com/thirdgen88/ignition-docker) on GitHub. I think there is a great use case here for those doing Ignition development. I’ve recently made some additional updates to the [kcollins/ignition](https://hub.docker.com/kcollins/ignition) Docker Image and most recently created a repository of Docker Compose example implementations. These can be helpful for quickly and easily pairing a database with your Ignition gateway to do development! I wanted to share this initial effort to help get folks going with Ignition and Docker.

> **[thirdgen88/ignition-examples](https://github.com/thirdgen88/ignition-examples)**
>
> Ignition Examples with Docker Compose. Contribute to thirdgen88/ignition-examples development by creating an account on GitHub.

I hope to continue this effort and create some additional guides and tutorial media/materials in the future as well. Let me know what you think! Pull requests welcome, and feel free to create a GitHub issue there too if you have trouble getting things working.

---

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [January 30, 2019, 6:03pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/2 "2019-01-30T18:03:03Z")

</div>

Just wanted to say thank you for this. We’ve been using your images on dockerhub for a while and they’ve been a great help!

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [January 31, 2019, 12:19pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/3 "2019-01-31T12:19:58Z")

</div>

We too started using docker for Ignition development recently, and it works like a charm.

It’s a lot faster to set up a new installation compared to virtual machines, there’s a lot you can automate (f.e. automatically copying backups), and it’s a lot lighter on resources than virtual machines.

Though I’m still looking for ways to make it more accessible for my colleagues with less Linux/CLI experience. For the moment, I’m using Portainer as GUI for docker, so they can start, stop and add containers. But defining volumes in Portainer is quite cumbersome, and you really need named volumes for a project that takes some months to develop.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [January 31, 2019, 9:29pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/4 "2019-01-31T21:29:53Z")

</div>

Big fan of Portainer too… I will try to share some of the templates for that that I setup to enable quick one-click[ish] creation of Ignition containers through Portainer. It is a nice GUI front end for Docker, and is improving all the time…

---

<div class="post-metadata">

**Author:** ![tcurtis](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tcurtis/32/8653_2.png) [@tcurtis](https://forum.inductiveautomation.com/u/tcurtis)\
**Post date:** [April 22, 2019, 8:15pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/5 "2019-04-22T20:15:52Z")

</div>

Does Inductive consider Ignition running under docker supported?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 22, 2019, 8:23pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/6 "2019-04-22T20:23:17Z")

</div>

Basically yes, as per some licensing changes we made in the 7.9 branch. You’re pretty much on your own as far as configuration, though there are plans for better support - possibly in 8.1, but we’re still exploring our options.

---

<div class="post-metadata">

**Author:** ![tcurtis](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tcurtis/32/8653_2.png) [@tcurtis](https://forum.inductiveautomation.com/u/tcurtis)\
**Post date:** [April 26, 2019, 4:32pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/7 "2019-04-26T16:32:58Z")

</div>

@Kevin.Collins are you planning on getting 8.0.0 GA added to your docker? #AskingForAFriend 😉

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [April 27, 2019, 4:00pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/8 "2019-04-27T16:00:23Z")

</div>

Yes, I’m working on it! I’m working through some recent changes regarding Ignition Edge no longer being in the main installer (which I was using for the Dockerfiles). I’m moving over to just using the zip package so that way it will be the same between Edge and Standard.

Stay tuned! I will let folks know here when I’ve updated things.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [April 28, 2019, 6:04am UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/9 "2019-04-28T06:04:31Z")

</div>

Ignition 8.0.0 Docker Image released! 😀

I’ve yet to update the examples repo (that is the subject of this post) with the new kcollins/ignition:8.0.0 tags, I’ll get there at some point here.

---

<div class="post-metadata">

**Author:** ![oscar.salcedo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/oscar.salcedo/32/11019_2.png) [@oscar.salcedo](https://forum.inductiveautomation.com/u/oscar.salcedo)\
**Post date:** [May 1, 2019, 5:51pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/10 "2019-05-01T17:51:04Z")

</div>

I was hoping this was already out! Thanks a bunch for your hard work!

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [May 3, 2019, 3:35pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/11 "2019-05-03T15:35:02Z")

</div>

You are welcome! I just pushed a new image after discovering a small [bug](https://github.com/thirdgen88/ignition-docker/issues/5) with how I was trying to reduce the image size (by extracting and then purging the archived JRE runtime files). The Designer Launcher in 8.0.0 will download the JRE bundle (for the appropriate platform) from the gateway. Please do another _docker image pull_ to get the latest and avoid the “503 Runtime does not exist” error.

---

<div class="post-metadata">

**Author:** ![oscar.salcedo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/oscar.salcedo/32/11019_2.png) [@oscar.salcedo](https://forum.inductiveautomation.com/u/oscar.salcedo)\
**Post date:** [July 17, 2019, 2:38pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/12 "2019-07-17T14:38:46Z")

</div>

Hi!  
First off, big Thanks for the awesome work getting this container available to the community!

I can’t seem to be able to set the environment variables when I deploy the container. I am using portainer to manage my docker environment(s) and at some point I was able to specify the different ENV variables, but not anymore.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/2963980cbefdc8ec5f2bafb06d72201766f2d254.png)

When the image deploys, none of those settings seem to be applied. ie: gateway.xml contains this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/540ce686795da1fb29d9415d8e593f9dd0a5fd3c.png)

Any ideas?

Thanks!

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [July 17, 2019, 10:15pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/13 "2019-07-17T22:15:24Z")

</div>

I just tried this on the command line with the _docker run_ below:

```
$ docker run -p 8089:8089 -p 8044:8044 -v variable_test:/var/lib/ignition/data -e GATEWAY_ADMIN_PASSWORD=password -e GATEWAY_HTTP_PORT=8089 -e GATEWAY_HTTPS_PORT=8044 -e GATEWAY_INIT_MEMORY=1536 -e GATEWAY_MAX_MEMORY=1792 kcollins/ignition:8.0.2

```

It came up as expected on the alternate ports, and the `data/gateway.xml` showed the adjusted keys for the HTTP and HTTPS port. Additionally, the gateway memory values were successfully put into effect.

Here are a couple things of note:

- The `GATEWAY_HTTP_PORT` and `GATEWAY_HTTPS_PORT` (as well as the gateway network) environment variables will only take effect on a new container [against a new volume, if applicable]. With the command above, you should see lines like these at the beginning of the log (after which the `data/gateway.xml` file will be configured correctly):

```auto
Provisioning will be logged here: /usr/local/share/ignition/logs/provisioning.log
Waiting for commissioning servlet to become active...
Performing commissioning actions...
  GATEWAY_ADMIN_USERNAME: admin
  GATEWAY_HTTP_PORT: 8089
  GATEWAY_HTTPS_PORT: 8044
Shutting down interim provisioning gateway...
Starting Ignition Gateway...

```

- The `GATEWAY_INIT_MEMORY` and `GATEWAY_MAX_MEMORY` environment variables are appended to the launch command and will override any values in the `ignition.conf` file, FYI.

Let me know if any of these insights are of help—I’d definitely like to help you get through any issues you’re having! At some point I had considered creating a Portainer example with built-in Ignition templates. It sounds like that might be a useful thing.

Thanks for the feedback!

---

<div class="post-metadata">

**Author:** ![oscar.salcedo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/oscar.salcedo/32/11019_2.png) [@oscar.salcedo](https://forum.inductiveautomation.com/u/oscar.salcedo)\
**Post date:** [July 17, 2019, 10:38pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/14 "2019-07-17T22:38:32Z")

</div>

Thanks Kevin!  
Interesting; I do see my override ENV variables in the log, but the data/gateway.xml still shows port 8080.  
I noticed the other day that when you first install ignition (not docker image), it will not let you assign a port below 1024; I was trying to use port 80, maybe that’s the reason?  
Good call on the \*MEMORY ENV variables, I did notice that but the Gateway status page was showing my docker startup settings correctly.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [July 20, 2019, 1:51am UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/15 "2019-07-20T01:51:25Z")

</div>

Ports below 1024 can’t be allocated by a non-superuser. The docker container runs as `ignition` with UID 999. You’d have to run the container as `root` if you really want to allocate ports between 1-1023.

---

<div class="post-metadata">

**Author:** ![BFischer](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@BFischer](https://forum.inductiveautomation.com/u/BFischer)\
**Post date:** [August 5, 2019, 3:08pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/16 "2019-08-05T15:08:59Z")

</div>

Could you please post a Portainer example? I’ve been using docker containers on various stand alone machines, but now I’m trying to move to a docker swarm and added Portainer as well. However, I can’t get a container nor a service to run 8.0.2 successfully.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [February 28, 2020, 9:49pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/17 "2020-02-28T21:49:25Z")

</div>

Just setup Docker&Portainer on headless Debain stretch this week, great work, thanks!

---

<div class="post-metadata">

**Author:** ![philc](https://avatars.discourse-cdn.com/v4/letter/p/b5e925/32.png) [@philc](https://forum.inductiveautomation.com/u/philc)\
**Post date:** [April 23, 2020, 8:14pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/18 "2020-04-23T20:14:37Z")

</div>

I have been unsuccessfully attempting to get ignition running in docker for a couple days now and continue to have the same error preventing my container from starting.  
I have the following error…

```auto
/usr/local/bin/docker-entrypoint.sh: line 364: /usr/local/share/ignition/data/.docker-init-complete: Permission denied

```

I am using the following to start my container.

```auto
docker run --name my-ignition \
-v ~/docker/ignition/ignition.conf:/var/lib/ignition/data/ignition.conf \
-v ~/docker/ignition/data:/var/lib/ignition/data \
-p 8088:8088 \
-e GATEWAY_ADMIN_PASSWORD=password \
-d kcollins/ignition

```

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [April 24, 2020, 12:21am UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/19 "2020-04-24T00:21:38Z")

</div>

@philc, welcome to the forums! Thanks for reaching out. I want to point you toward this GitHub issue for some relevant conversation:

> <https://github.com/thirdgen88/ignition-docker/issues/1>
>
> The README.md suggests that preservation of the Ignition Gateway "instance data"… can be done with a named volume against \`/var/lib/ignition/data\`. In the current \`Dockerfile\`, there are several files linked from there back to \`/etc/ignition\`, namely:
> 
> \* ignition.conf
> \* gateway.xml
> \* log4j.properties
> 
> Should probably have these directly placed in \`/var/lib/ignition/data\` by the install process instead of linked as a convenience measure for volume-mapping.

Long story short, I think you need to use a named volume for your `/var/li/ignition/data` volume, otherwise you’re likely to have to deal with a bunch of permissions issues against your local filesystem.

So it might look like this:

```bash
# Change to your target directory
cd ~/docker/ignition
# Create the volume
docker volume create my-ignition-data
# Copy the base ignition.conf if you don't have it already
docker run --rm -v ${PWD}:/output kcollins/ignition:latest \
  cp /var/lib/ignition/data/ignition.conf /output/
# Use a bind-mount for the custom ignition.conf, but a named volume for everything else
docker run --name my-ignition \
  -v ~/docker/ignition/ignition.conf:/var/lib/ignition/data/ignition.conf \
  -v my-ignition-data:/var/lib/ignition/data \
  -p 8088:8088
  -e GATEWAY_ADMIN_PASSWORD=password \
  -d kcollins/ignition:latest

```

Hopefully this will get you cooking!

---

<div class="post-metadata">

**Author:** ![philc](https://avatars.discourse-cdn.com/v4/letter/p/b5e925/32.png) [@philc](https://forum.inductiveautomation.com/u/philc)\
**Post date:** [April 24, 2020, 1:18pm UTC](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126/20 "2020-04-24T13:18:19Z")

</div>

Thank you! That got me going. Appreciate the assistance.

[Next page](https://forum.inductiveautomation.com/t/ignition-under-docker-usage-examples/22126.md?page=2)
