Module: Kubes::Compiler::Shared::Helpers::DockerHelper

Included in:
Kubes::Compiler::Shared::Helpers
Defined in:
lib/kubes/compiler/shared/helpers/docker_helper.rb

Instance Method Summary collapse

Instance Method Details

#built_imageObject



9
10
11
12
# File 'lib/kubes/compiler/shared/helpers/docker_helper.rb', line 9

def built_image
  Deprecated.new.built_image
  built_image_helper
end

#built_image_helperObject



14
15
16
17
18
19
20
21
# File 'lib/kubes/compiler/shared/helpers/docker_helper.rb', line 14

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

#docker_imageObject



3
4
5
6
7
# File 'lib/kubes/compiler/shared/helpers/docker_helper.rb', line 3

def docker_image
  return @options[:image] if @options[:image] # override
  return Kubes.config.image if Kubes.config.image
  built_image_helper
end