Comments (2)
Hey @tchochunk, here are some good documentations that we have that covers how to configure container create options for IoT Edge modules and modules access to a device's local storage. Let us know if this helps.
from iotedge.
@david-emakenemi thank you for the response. I read both those articles and if I copy the HostConfig section from modules access to a device's local storage and use that with my information, it does work. But I dont know what it does. After reading several sites, it seems that Volumes are better than binds but i cant find any documentation on implementing Volumes. While I have a working example, I dont have an understanding of what is happening and the 2 articles are focused on a very small subset of the options available.
I guess I am looking for additional documentation so I will keep searching.
Sincerely, Thank You.
UPDATE: so i made some progress and my conclusion is to carefully read and study the documentation on the docker website https://docs.docker.com/engine/api/v1.30/#tag/Container/operation/ContainerCreate. After this post and following my own advice i came up with the following couple of solutions:
The following config will work (as @david-emakenemi referenced) and the data stored will survive container restarts and deploys:
{
"HostConfig": {
"Mounts": [
{
"Type": "bind",
"Source": "/srv/db/data",
"Target": "/data",
"ReadOnly": false
}
]
}
}
The following also works but creates a volume that maps to the docker managed location (/var/lib/docker/volumes). while i can specify the volume name i did not see a way to specify the source location. maybe i could make the volume separately and specify the location there and just reference that volume here???
{
"HostConfig": {
"Mounts": [
{
"Type": "volume",
"Source": "desiredVolumeName",
"Target": "/data",
"ReadOnly": false
}
]
}
}
from iotedge.
Related Issues (20)
- IoT device works perfectly for days, then it does not - reboot fixes issue HOT 3
- Error getting device scope result from IoTHub (IotHubUnauthorizedAccess) HOT 2
- Unexpected shutdown, is it a kind of planned upgrade? HOT 4
- Direct Method of IoTEdge module takes 3 minutes to start responding HOT 11
- IoT Edge produces too much traffic with default configuration, it is not conducive for billable networks such as cellular. HOT 13
- Iotedge fails to make docker-proxy.sock after reboot (file exists) in Ubuntu Core HOT 15
- How to run aziot-edge in a docker container? HOT 10
- EdgeAgent does not restart crashed module if busy downloading new manifest 1.4.10 HOT 3
- Can not ssh into a (running) VM with Ubuntu Core 20 on my k3s cluster HOT 1
- Reported twin does not reflect running container HOT 2
- Scarthgap support? HOT 1
- Best Practices/Guidance on upgrading a remote database module HOT 3
- edgeAgent hangs after a networking issue. HOT 2
- [Documentation] [Low priority] Add to the config.toml template and documentation a section for logging HOT 2
- "Did not receive ack for message / System.TimeoutException: Message completion response not received" errors after environment upgrade HOT 3
- Iot edge not starting on debian bullseye HOT 2
- IoT Edge child node unable to connect to IoT Edge transparent gateway
- User module unable to connect to Hub with 'Communication_error' HOT 1
- EdgeHub fails to parse valid D2C creation time UTC string
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 iotedge.