Comments (6)
I ran some more tests and everything is fine even after rebooting. In conclusion using a named volume works as expected.
from ignition-docker.
Fixed with update to bring those configuration files directly into /var/lib/ignition/data
from ignition-docker.
Hi Kevin,
Quick question, how/when can one use the /var/lib/ignition
(as specified on the docker hub page) volume bind to persist data? For example trying docker run --name ignition -v /opt/ignition:/var/lib/ignition -d kcollins/ignition
(or even -v /opt/ignition:/var/lib/ignition/data
) on a fresh machine, results in:
morfic@blackhole:~$ sudo docker logs ignition
FATAL | wrapper | Unable to open configuration file: /var/lib/ignition/data/ignition.conf (No such file or directory)
FATAL | wrapper | Current working directory: /usr/local/share/ignition
FATAL | wrapper | The Wrapper will stop.
Looking at the content of the exported image, it looks like the required files are inside one of the layer-tar files, thus something must be off somewhere but I can't put my finger on it
Kind regards
from ignition-docker.
@M0rfic, I see the same behavior here.. I'm certain that this worked at some point so I'll need to see what happened.. Many of the times I use this image I'm using it in a docker-compose setup, e.g.:
version: '3'
services:
gateway:
image: "kcollins/ignition:latest"
volumes:
- gateway_data:/var/lib/ignition
ports:
- "8088:8088"
db:
image: "mysql:5.7"
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ignition
volumes:
gateway_data:
db_data:
Just put the above into a docker-compose.yml
inside of an empty directory, cd
to it and run docker-compose up -d
. You can then shutdown and remove the containers (preserving the volumes) with docker-compose down
(you can wipe everything with docker-compose down -v
).
I just tested this and it successfully preserves things as expected. I'll get back with you as to why the base bind-mounting isn't behaving properly.
from ignition-docker.
@M0rfic, in another look at the documentation I posted, I see now that I only suggest use of a named volume, not a bind-mount volume. I'll leave this issue open and see if I can come up with the suggested way to have the persisted data live directly in a specific location on the host (versus squirreled away in the Docker volume structures elsewhere on the filesystem).
Take a closer read at How to Persist Gateway Data and see if that makes sense.
from ignition-docker.
Kevin, thanks for taking the time to reply and for "investing" in the images themselves.
It seems that with a named volume it works as expected. I didn't want to use them in the first place because I was not entirely sure that they were persisted on reboots. I'm running them under rancher-os and I had some issues with binding the gwbk file because I put it in such a directory, and upon restart it vanished. However, given that this is a main feature of docker, I suppose that the configured directory for named volumes should be persisted. I'll make some more tests, as I can't restart the VM right now and get back to you.
P.S. Perhaps it would be a good idea to update the docs and specify specifically that named mounts are required, you know for those of us that are not native English speakers 😄.
from ignition-docker.
Related Issues (20)
- Update README with links to Official Image
- Add support for Docker Buildx Bake
- Linking ApexCharts-signed.modl third-party module causes container to fail-to-start HOT 1
- Third party jdbc driver not loading from /jdbc mount HOT 4
- `IGNITION_GID` value that conflicts with built-in container groups is fatal error
- host volume path HOT 11
- Modules Paths HOT 2
- Specifying only `GATEWAY_INIT_MEMORY` can cause container not to start
- Remove extracted jre-nix from -slim image
- Restoring Edge GWBK through `/restore.gwbk` comes up in Full edition mode
- Adapt auto-commissioning to use upstream capabilities HOT 1
- Correct bug in handling of GATEWAY_SYSTEM_NAME with spaces HOT 2
- Blank leased-activation config being written to disk causing error on startup
- Volume marker not being placed properly in data volume
- Empty Volume Mode for WSL2<>Windows bindings causing failures on startup
- JDBC Drivers not being properly linked in on 8.1.8
- Third-party modules licenses with filenames other than `license.html` fail to link HOT 1
- Linking Sepasoft modules HOT 3
- Add ability to run-as-root
- Upgraded module from /modules ended up in Quarantine
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ignition-docker.