Sha256: 07a09ab70275bd843184f7bdecae5983f73320041522fd689498badbc96034fa

Contents?: true

Size: 641 Bytes

Versions: 12

Compression:

Stored size: 641 Bytes

Contents

module Kubes::Compiler::Shared::Helpers
  module DockerHelper
    def docker_image
      return @options[:image] if @options[:image] # override
      return Kubes.config.image if Kubes.config.image
      built_image_helper
    end

    def built_image
      Deprecated.new.built_image
      built_image_helper
    end

    def built_image_helper
      path = Kubes.config.state.path
      unless File.exist?(path)
        raise Kubes::MissingDockerImage.new("Missing file with docker image built by kubes: #{path}. Try first running: kubes docker build")
      end
      data = JSON.load(IO.read(path))
      data['image']
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kubes-0.9.3 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.9.2 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.9.1 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.9.0 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.10 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.9 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.8 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.7 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.6 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.5 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.4 lib/kubes/compiler/shared/helpers/docker_helper.rb
kubes-0.8.3 lib/kubes/compiler/shared/helpers/docker_helper.rb