Module: Docker::Ruby
Constant Summary
Constants included
from Docker
USER_NAME
Instance Method Summary
collapse
Methods included from Helpers
rails_image, rails_server
Methods included from Docker
ID, PATH, all_containers, containers, find_container, find_containers, find_image, images, inspekt, run, validate_search_parameters
Instance Method Details
#build(app_path) ⇒ Object
8
9
10
11
|
# File 'lib/docker/ruby.rb', line 8
def build(app_path)
path = Docker::PATH(app_path)
Docker.build(path, "ruby-#{path.name}")
end
|
#run_irb(app_path, flags = '', command = '') ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/docker/ruby.rb', line 13
def run_irb(app_path, flags = '', command = '')
path = Docker::PATH(app_path)
name = path.name
image = "jphager2/ruby-#{path.name}"
flags = "-it --name ruby-irb-#{name} -v #{path}:/usr/src/app #{flags}"
docker_cmd = "docker run #{flags} #{image} #{command}"
Docker::Interactive.warn(docker_cmd)
docker_cmd
end
|