Class: Vx::ContainerConnector::Docker::Default
- Inherits:
-
Object
- Object
- Vx::ContainerConnector::Docker::Default
- Defined in:
- lib/vx/container_connector/docker/default.rb
Class Method Summary collapse
- .create_container_options ⇒ Object
- .ssh_host ⇒ Object
- .ssh_port ⇒ Object
- .start_container_options ⇒ Object
- .testing? ⇒ Boolean
Class Method Details
.create_container_options ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/vx/container_connector/docker/default.rb', line 26 def if testing? { "ExposedPorts" => { "22/tcp" => {} } } else {} end end |
.ssh_host ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/vx/container_connector/docker/default.rb', line 10 def ssh_host if testing? 'localhost' else nil end end |
.ssh_port ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/vx/container_connector/docker/default.rb', line 18 def ssh_port if testing? 2122 else nil end end |
.start_container_options ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/vx/container_connector/docker/default.rb', line 34 def if testing? { "PortBindings" => { "22/tcp" => [{ "HostPort" => "2022" }] } } else {} end end |
.testing? ⇒ Boolean
42 43 44 |
# File 'lib/vx/container_connector/docker/default.rb', line 42 def testing? ENV['VX_ENV'] == 'test' end |