Sha256: f7534b643b11ee46cf54c6c83ef03ddc30c9e4e76537cb95ab7440195cd618d6

Contents?: true

Size: 815 Bytes

Versions: 7

Compression:

Stored size: 815 Bytes

Contents

require_relative 'common'
require_relative 'docker_helper'

module Kontena::Cli::Apps
  class BuildCommand < Clamp::Command
    include Kontena::Cli::Common
    include Common
    include DockerHelper

    option ['-p', '--project-name'], 'NAME', 'Specify an alternate project name (default: directory name)'
    option ['-f', '--file'], 'FILE', 'Specify an alternate Kontena compose file', attribute_name: :filename, default: 'kontena.yml'
    option ['--no-cache'], :flag, 'Do not use cache when building the image', default: false
    parameter "[SERVICE] ...", "Services to build"

    attr_reader :services

    def execute
      require_config_file(filename)
      @services = services_from_yaml(filename, service_list, service_prefix)
      process_docker_images(services, true, no_cache?)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kontena-cli-0.14.7 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.14.6 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.14.5 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.14.4 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.14.3 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.14.2 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.14.1 lib/kontena/cli/apps/build_command.rb