Class: Kamal::Commands::Builder::Native::Cached

Inherits:
Kamal::Commands::Builder::Native show all
Defined in:
lib/kamal/commands/builder/native/cached.rb

Constant Summary

Constants inherited from Base

Base::ENDPOINT_DOCKER_HOST_INSPECT

Constants inherited from Kamal::Commands::Base

Kamal::Commands::Base::DOCKER_HEALTH_STATUS_FORMAT

Instance Attribute Summary

Attributes inherited from Kamal::Commands::Base

#config

Instance Method Summary collapse

Methods inherited from Kamal::Commands::Builder::Native

#info

Methods inherited from Base

#build_context, #build_options, #clean, #config_context_hosts, #first_mirror, #pull, #validate_image

Methods inherited from Kamal::Commands::Base

#container_id_for, #initialize, #make_directory, #make_directory_for, #remove_directory, #run_over_ssh

Constructor Details

This class inherits a constructor from Kamal::Commands::Base

Instance Method Details

#context_hostsObject



17
18
19
# File 'lib/kamal/commands/builder/native/cached.rb', line 17

def context_hosts
  docker :buildx, :inspect, builder_name, "> /dev/null"
end

#createObject



2
3
4
# File 'lib/kamal/commands/builder/native/cached.rb', line 2

def create
  docker :buildx, :create, "--name", builder_name, "--use", "--driver=docker-container"
end

#pushObject



10
11
12
13
14
15
# File 'lib/kamal/commands/builder/native/cached.rb', line 10

def push
  docker :buildx, :build,
    "--push",
    *build_options,
    build_context
end

#removeObject



6
7
8
# File 'lib/kamal/commands/builder/native/cached.rb', line 6

def remove
  docker :buildx, :rm, builder_name
end