Module: Chef::Sugar::Docker

Extended by:
Docker
Included in:
Docker
Defined in:
lib/chef/sugar/docker.rb

Instance Method Summary collapse

Instance Method Details

#docker?(node) ⇒ Boolean

Returns true if the current node is a docker container.

Parameters:

Returns:

  • (Boolean)


32
33
34
# File 'lib/chef/sugar/docker.rb', line 32

def docker?(node)
  File.exist?('/.dockerinit') || File.exist?('/.dockerenv')
end