awesome-compose icon indicating copy to clipboard operation
awesome-compose copied to clipboard

How to start a privileged replica in swarm mode?

Open jeyrce opened this issue 2 years ago • 1 comments

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?

jeyrce avatar Jul 22 '22 08:07 jeyrce

Who can help?

jeyrce avatar Aug 04 '22 03:08 jeyrce

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 avatar Dec 22 '22 17:12 mikesir87

@mikesir87 Okay, thanks.

jeyrce avatar Dec 23 '22 02:12 jeyrce