class DockerAlias::Configuration
Attributes
cache_buster_key[RW]
enviroments[W]
options[W]
port_maps[W]
repo[RW]
tag[RW]
Public Class Methods
new()
click to toggle source
# File lib/docker_alias/configuration.rb, line 6 def initialize @repo = '' @tag = 'latest' @cache_buster_key = 'CACHE_BUSTER_' @options = [] @enviroments = {} @port_maps = [] end
Public Instance Methods
build_name()
click to toggle source
# File lib/docker_alias/configuration.rb, line 15 def build_name "#{@repo}:#{@tag}" end
enviroments()
click to toggle source
# File lib/docker_alias/configuration.rb, line 27 def enviroments envs = [] @enviroments.each do |key, value| envs << "-e #{key}=#{value}" end envs.join(" ") end
options()
click to toggle source
# File lib/docker_alias/configuration.rb, line 19 def options @options.join(" ") end
port_maps()
click to toggle source
# File lib/docker_alias/configuration.rb, line 23 def port_maps @port_maps.map{ |x| "-p #{x}" }.join(" ") end