Docker Community Forums

Share and learn in the Docker community.

Possible to know ipc configuration from environment variable?


(Bgaillard) #1

Hi, we need to execute a Docker container with the ipc=host option to run a PHP script. This is because we use Mutex and Shared memory segments.

Because our PHP script can be executed by our customers and if the Mutex does not work it can cause critical problems we would like to check the following.

  1. Check if the PHP script is executed inside a Docker container
  2. If the PHP script is executed inside a Docker container check the ipc configuration and exit if the configuration is not good

Is this possible and how can we do that ?

Thanks