awesome-compose
awesome-compose copied to clipboard
How to start a privileged replica in swarm mode?
compose
version: "3.8"
services:
udcp_collect:
image: hub.deepin.com/xapi:pre-amd64
privileged: true
volumes:
- /opt/udcp/udcp_collect/hardware_information/:/service/data/
- /sbin/dmidecode:/sbin/dmidecode
- /dev/mem:/dev/mem
command:
- "/service/api"
logging:
options:
max-size: 10m
max-file: 3
problem
The container were able to read the volume /dev/mem
in docker-compose mode, but not worked in swarm mode like the follow log:
x_udcp-collect.1.9fh93hvhqa4m@uos-PC | panic: failed to open stream: open /dev/mem: operation not permitted
Seems the privileged
were not supported in swarm mode when stack deployed. So how to read special file like /dev/mem
in swarm mode?
Who can help?
Hi @jeyrce! Apologies for the delay in responding to your question. Unfortunately, this repo's issue queue isn't intended to provide support or troubleshooting for deployment issues beyond the projects that are defined in this repo.
If you still need help, feel free to go to our other support channels (Docker Forums, Reddit, StackOverflow, etc.) to get additional assistance.
@mikesir87 Okay, thanks.