Reputation: 577
I am trying to detect if java app running as systemd service is operating inside lxc container from app itself through java code.
checking /proc/self/cgroup
file for “lxc” string works if app is not started as a service.
If its started as a service this file does not contain anything related to “lxc”
I need a way to detect if java app is running inside lxc even if its started through sudo service serviceName start
Upvotes: 1
Views: 48