Class: Hookit::Platform::Docker
- Defined in:
- lib/hookit/platform/docker.rb
Instance Method Summary collapse
Instance Method Details
#detect? ⇒ Boolean
5 6 7 8 9 10 |
# File 'lib/hookit/platform/docker.rb', line 5 def detect? ! `if [ -f "/.dockerenv" ] || [ -f "/.dockerinit" ] || \ grep -qF /docker/ "/proc/self/cgroup" 2>/dev/null; then echo docker fi`.empty? end |
#name ⇒ Object
12 13 14 |
# File 'lib/hookit/platform/docker.rb', line 12 def name 'docker' end |
#os ⇒ Object
16 17 18 |
# File 'lib/hookit/platform/docker.rb', line 16 def os 'linux' end |