Class: Mrsk::Commands::Builder::Multiarch

Inherits:
Base show all
Defined in:
lib/mrsk/commands/builder/multiarch.rb

Direct Known Subclasses

Remote

Defined Under Namespace

Classes: Remote

Constant Summary

Constants inherited from Mrsk::Commands::Base

Mrsk::Commands::Base::DOCKER_HEALTH_LOG_FORMAT, Mrsk::Commands::Base::DOCKER_HEALTH_STATUS_FORMAT

Instance Attribute Summary

Attributes inherited from Mrsk::Commands::Base

#config

Instance Method Summary collapse

Methods inherited from Base

#build_context, #build_options, #clean, #pull

Methods inherited from Mrsk::Commands::Base

#container_id_for, #initialize, #run_over_ssh

Constructor Details

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

Instance Method Details

#createObject



2
3
4
# File 'lib/mrsk/commands/builder/multiarch.rb', line 2

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

#infoObject



19
20
21
22
23
# File 'lib/mrsk/commands/builder/multiarch.rb', line 19

def info
  combine \
    docker(:context, :ls),
    docker(:buildx, :ls)
end

#pushObject



10
11
12
13
14
15
16
17
# File 'lib/mrsk/commands/builder/multiarch.rb', line 10

def push
  docker :buildx, :build,
    "--push",
    "--platform", "linux/amd64,linux/arm64",
    "--builder", builder_name,
    *build_options,
    build_context
end

#removeObject



6
7
8
# File 'lib/mrsk/commands/builder/multiarch.rb', line 6

def remove
  docker :buildx, :rm, builder_name
end