Class: Avm::Self::Instance

Inherits:
Instances::Base show all
Defined in:
lib/avm/self/instance.rb,
lib/avm/self/instance/entry_keys.rb

Defined Under Namespace

Modules: EntryKeys

Constant Summary collapse

DEFAULT_INSTANCE_ID =
'avm_self'

Constants inherited from Instances::Base

Instances::Base::ID_PATTERN

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Instances::Base

by_id, #data_package, #data_package_create, #host_env_uncached, #id, #local?, #to_s

Methods included from With::ApplicationStereotype

#stereotype_namespace_module

Methods included from With::ExtraSubcommands

#extra_available_subcommands, #extra_available_subcommands_from_runners_module

Methods included from Entries::Base

#entries_provider_id, #entries_provider_id!, #entry, #full_entry_path, #path_prefix, #read_entry, #read_entry_optional

Class Method Details

.defaultObject



13
14
15
# File 'lib/avm/self/instance.rb', line 13

def default
  @default ||= by_id(DEFAULT_INSTANCE_ID)
end

Instance Method Details

#docker_image_classObject



18
19
20
# File 'lib/avm/self/instance.rb', line 18

def docker_image_class
  ::Avm::Self::DockerImage
end

#docker_registryObject



22
23
24
# File 'lib/avm/self/instance.rb', line 22

def docker_registry
  read_entry(::Avm::Self::Instance::EntryKeys::DOCKER_REGISTRY_NAME)
end

#docker_run_argumentsObject



26
27
28
# File 'lib/avm/self/instance.rb', line 26

def docker_run_arguments
  ['-e', "LOCAL_USER_ID=#{::Process.uid}"]
end