Method: Docker::Exec.create
- Defined in:
- lib/docker/exec.rb
.create(options = {}, conn = Docker.connection) ⇒ Docker::Exec
Create a new Exec instance in a running container. Please note, this does NOT execute the instance - you must run #start. Also, each instance is one-time use only.
20 21 22 23 24 25 26 |
# File 'lib/docker/exec.rb', line 20 def self.create( = {}, conn = Docker.connection) container = .delete('Container') resp = conn.post("/containers/#{container}/exec", {}, :body => .to_json) hash = Docker::Util.parse_json(resp) || {} new(conn, hash) end |