Sha256: f8cd9eb362b45d3bd03a7febe55e9b0f2d9ec3b3d5d907d305dfc5cf383da732

Contents?: true

Size: 775 Bytes

Versions: 4

Compression:

Stored size: 775 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'
    parameter "[SERVICE] ...", "Services to start"

    attr_reader :services, :service_prefix

    def execute
      require_config_file(filename)
      @service_prefix = project_name || current_dir
      @services = load_services(filename, service_list, service_prefix)
      process_docker_images(services, true)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kontena-cli-0.10.3 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.10.2 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.10.1 lib/kontena/cli/apps/build_command.rb
kontena-cli-0.10.0 lib/kontena/cli/apps/build_command.rb