def core():
 from fabtools.require.deb import package as require_deb_package
 from fabtools.require.rpm import package as require_rpm_package
 family = distrib_family()
 if (not files.exists('/usr/bin/sudo')):
  raise Exception(('Please install the sudo package and execute adduser %s sudo' % env.user))
 if (not files.exists('/usr/bin/docker')):
  if (family == 'debian'):
   require_deb_package('curl')
  elif (family == 'redhat'):
   require_rpm_package('curl')
  else:
   raise UnsupportedFamily(supported=['debian', 'redhat'])
  run_as_root('curl -sSL https://get.docker.com/ | sh')

def core ( ) : from fabtools . require . deb import package as require_deb_package from fabtools . require . rpm import package as require_rpm_package family = distrib_family ( ) if ( not files . exists ( '/usr/bin/sudo' ) ) : raise Exception ( ( 'Please install the sudo package and execute adduser %s sudo' % env . user ) ) if ( not files . exists ( '/usr/bin/docker' ) ) : if ( family == 'debian' ) : require_deb_package ( 'curl' ) elif ( family == 'redhat' ) : require_rpm_package ( 'curl' ) else : raise UnsupportedFamily ( supported = [ 'debian' , 'redhat' ] ) run_as_root ( 'curl -sSL https://get.docker.com/ | sh' )
require the docker core installation .