Detect container

how do you detect easy a container in the container ?

i have a container domoticz when i’m going(exec) in the container, how do i to detect the domoticz service is a container ?

You can’t really do that, but you can check some facts in the environment which can indicate the process is running in a container. Even if you do that, it could be different everywhre. As I suggested in this topic

I recommend setting an environment variable as you would when running systemd in a container or check whether you can do something in the environment or not.

You can also find this link in the mentioned topic:

The user in the other topic opened this issue as I suggested, but I suspected what the answer would be. The issue was closed and a project member basically suggested what I did.