Hi
I have a container, which i want to deploy as custom iot edge module. This module has a container that needs privileged access because we want to volume mount /dev of host system regarding serial ports.
Below is the snapshot of createOptions in deployment.json file where I defined Privileged as true for HostConfigs. Is this correct or some changes required. Also is it possible to provide privileged access only to particular file or directory example: /dev/ttyS0 . I want to expose serial port /dev/ttyS0
Please suggest and correct me, if correction required and share more info on this.
"createOptions": {
"ExposedPorts": {
"12345/tcp": {},
"/dev/ttyS0":{}
},
"Env": [
"SAMPLE_PORT=12345",
"SERIAL_PORT=/dev/ttySO"
],
"Volumes": {
"/dev": {}
},
"HostConfig": {
"Privileged": true,
"NetworkMode": "host",
"Binds": [
"app_dev-data:/dev:rw"
],
"PortBindings": {
"12345/tcp": [
{
"HostIp": "",
"HostPort": "12345"
}
]
}
},
}