0

In our project we are using some network library with tricky rules to obey. One of them is that we should manually create some int identity that should be unique per process on same host (it should also be in specific range so we cannot use something like UUID). We have >1 containers on the same host so the idea is to synchronize generation of this identity between different processes. To do this i'd like to use named mutex from boost but i'm not sure whether it will work between docker containers in the same host. Has anyone any experience with named mutex in docker containers?

ice
  • 44
  • 3
  • I think you'll get better results just googling with "shm docker shared". This is highly specific, but only tangentially related to Boost – sehe Jun 25 '18 at 09:44

1 Answers1

0

Seems easiest to just use GUIDs.

On the topic of sharing shared memory namespace between containers and optionally the host system, see the --ipc parameter on docker run:

sehe
  • 374,641
  • 47
  • 450
  • 633