class Vx::ContainerConnector::Docker::Default

Public Class Methods

create_container_options() click to toggle source
# File lib/vx/container_connector/docker/default.rb, line 26
def create_container_options
  if testing?
    { "ExposedPorts" => { "22/tcp" => {} } }
  else
    {}
  end
end
ssh_host() click to toggle source
# File lib/vx/container_connector/docker/default.rb, line 10
def ssh_host
  if testing?
    'localhost'
  else
    nil
  end
end
ssh_port() click to toggle source
# File lib/vx/container_connector/docker/default.rb, line 18
def ssh_port
  if testing?
    2122
  else
    nil
  end
end
start_container_options() click to toggle source
# File lib/vx/container_connector/docker/default.rb, line 34
def start_container_options
  if testing?
    { "PortBindings" => { "22/tcp" => [{ "HostPort" => "2022" }] } }
  else
    {}
  end
end
testing?() click to toggle source
# File lib/vx/container_connector/docker/default.rb, line 42
def testing?
  ENV['VX_ENV'] == 'test'
end