Class: Kamal::Commands::Builder
- Inherits:
-
Base
- Object
- Base
- Kamal::Commands::Builder
show all
- Includes:
- Clone
- Defined in:
- lib/kamal/commands/builder.rb
Defined Under Namespace
Modules: Clone
Classes: Base, Multiarch, Native
Constant Summary
Constants inherited
from Base
Kamal::Commands::Base::DOCKER_HEALTH_STATUS_FORMAT
Instance Attribute Summary
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods included from Clone
#clone, #clone_reset_steps, #clone_revision, #clone_status
Methods inherited from Base
#container_id_for, #initialize, #make_directory, #make_directory_for, #remove_directory, #run_over_ssh
Instance Method Details
#ensure_local_dependencies_installed ⇒ Object
48
49
50
51
52
53
54
55
56
|
# File 'lib/kamal/commands/builder.rb', line 48
def ensure_local_dependencies_installed
if name.native?
ensure_local_docker_installed
else
combine \
ensure_local_docker_installed,
ensure_local_buildx_installed
end
end
|
#multiarch_remote ⇒ Object
#name ⇒ Object
8
9
10
|
# File 'lib/kamal/commands/builder.rb', line 8
def name
target.class.to_s.remove("Kamal::Commands::Builder::").underscore.inquiry
end
|
#target ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/kamal/commands/builder.rb', line 12
def target
case
when !config.builder.multiarch? && !config.builder.cached?
native
when !config.builder.multiarch? && config.builder.cached?
native_cached
when config.builder.local? && config.builder.remote?
multiarch_remote
when config.builder.remote?
native_remote
else
multiarch
end
end
|