docker-api 1.22.3 → 1.22.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 117d898640ffe2329cae78db491920f1dd942034
4
- data.tar.gz: 50c85dd32c4df0709fb643cbf457291cdfe286b7
3
+ metadata.gz: fc88282f3449c4fb8e6affac2797c2ea3cb86523
4
+ data.tar.gz: 1d9ac75e3edfa48cd2d4b74a7d0ff3d0e039b6c2
5
5
  SHA512:
6
- metadata.gz: efdd1ad76e89d1a369377382479fe98b1d83b311f7f05a8635732fb67d0222219b6b3fe126180fc898951a9857894fc9923e5c94383965eb9258bf2232881bfa
7
- data.tar.gz: 7625bea32eb364d2911c7ddc4e42bf07387629002ef5b58fec9d6af9a9087b44dd469f950db7bb137326ba0bf4d2d9fc56b09b1ea091052b5333b5a2ab95c50e
6
+ metadata.gz: d3a5bdadf4e241a23f65749cefb3e54536cda2b66de08edcc9335500f0471fee0570b9718fbe0002f951b26706ebe3eb35e4e3261034dff799aa80e924f9c22a
7
+ data.tar.gz: 41e5eb201edff3a670448223a1edc8ec5c5ee919ecc06ab04c1317d67b07e27f71b4215e75fb01de64695283073eb7188f1434ff8d7aac99a409b4adbf1840e2
data/README.md CHANGED
@@ -104,12 +104,15 @@ All of the following examples require a connection to a Docker server. See the <
104
104
  require 'docker'
105
105
  # => true
106
106
 
107
+ # docker command for reference: docker version
107
108
  Docker.version
108
109
  # => { 'Version' => '0.5.2', 'GoVersion' => 'go1.1' }
109
110
 
111
+ # docker command for reference: docker info
110
112
  Docker.info
111
113
  # => { "Debug" => false, "Containers" => 187, "Images" => 196, "NFd" => 10, "NGoroutines" => 9, "MemoryLimit" => true }
112
114
 
115
+ # docker command for reference: docker login
113
116
  Docker.authenticate!('username' => 'docker-fan-boi', 'password' => 'i<3docker', 'email' => 'dockerboy22@aol.com')
114
117
  # => true
115
118
  ```
@@ -122,8 +125,9 @@ Just about every method here has a one-to-one mapping with the [Images](https://
122
125
  require 'docker'
123
126
  # => true
124
127
 
125
- # Create an Image.
126
- image = Docker::Image.create('fromImage' => 'base')
128
+ # Pull an Image.
129
+ # docker command for reference: docker pull ubuntu:14.04
130
+ image = Docker::Image.create('fromImage' => 'ubuntu:14.04')
127
131
  # => Docker::Image { :id => ae7ffbcd1, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
128
132
 
129
133
  # Insert a local file into an Image.
@@ -134,11 +138,18 @@ image.insert_local('localPath' => 'Gemfile', 'outputPath' => '/')
134
138
  image.insert_local('localPath' => [ 'Gemfile', 'Rakefile' ], 'outputPath' => '/')
135
139
  # => Docker::Image { :id => eb693ec80, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
136
140
 
137
- # Tag an Image.
141
+ # Add a repo name to Image.
142
+ # docker command for reference: docker tag <IMAGE.ID> base2
138
143
  image.tag('repo' => 'base2', 'force' => true)
139
- # => nil
144
+ # => ["base2"]
145
+
146
+ # Add a repo name and tag an Image.
147
+ # docker command for reference: docker tag <IMAGE.ID> base2:latest
148
+ image.tag('repo' => 'base2', 'tag' => 'latest', force: true)
149
+ # => ["base2:latest"]
140
150
 
141
151
  # Get more information about the Image.
152
+ # docker command for reference: docker inspect <IMAGE.ID>
142
153
  image.json
143
154
  # => {"id"=>"67859327bf22ef8b5b9b4a6781f72b2015acd894fa03ce07e0db7af170ba468c", "comment"=>"Imported from -", "created"=>"2013-06-19T18:42:58.287944526-04:00", "container_config"=>{"Hostname"=>"", "User"=>"", "Memory"=>0, "MemorySwap"=>0, "CpuShares"=>0, "AttachStdin"=>false, "AttachStdout"=>false, "AttachStderr"=>false, "PortSpecs"=>nil, "Tty"=>false, "OpenStdin"=>false, "StdinOnce"=>false, "Env"=>nil, "Cmd"=>nil, "Dns"=>nil, "Image"=>"", "Volumes"=>nil, "VolumesFrom"=>""}, "docker_version"=>"0.4.0", "architecture"=>"x86_64"}
144
155
 
@@ -148,18 +159,26 @@ image.history
148
159
 
149
160
  # Push the Image to the Docker registry. Note that you have to login using
150
161
  # `Docker.authenticate!` and tag the Image first.
162
+ # docker command for reference: docker push <IMAGE.ID>
151
163
  image.push
152
- # => true
164
+ # => Docker::Image { @connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} }, @info = { "id" => eb693ec80, "RepoTags" => ["base2", "base2/latest"]} }
165
+
166
+ # Push individual tag to the Docker registry.
167
+ image.push(nil, tag: "tag_name")
168
+ image.push(nil, repo_tag: 'registry/repo_name:tag_name')
153
169
 
154
170
  # Given a command, create a new Container to run that command in the Image.
171
+ # docker command for reference: docker run -ti <IMAGE.ID> ls -l
155
172
  image.run('ls -l')
156
173
  # => Docker::Container { id => aaef712eda, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
157
174
 
158
175
  # Remove the Image from the server.
176
+ # docker command for reference: docker rmi -f <IMAGE.ID>
159
177
  image.remove(:force => true)
160
178
  # => true
161
179
 
162
180
  # Export a single Docker Image to a file
181
+ # docker command for reference: docker save <IMAGE.ID> my_export.tar
163
182
  image.save('my_export.tar')
164
183
  # => Docker::Image { :id => 66b712aef, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
165
184
 
@@ -168,6 +187,7 @@ image.save
168
187
  # => "abiglongbinarystring"
169
188
 
170
189
  # Given a Container's export, creates a new Image.
190
+ # docker command for reference: docker import some-export.tar
171
191
  Docker::Image.import('some-export.tar')
172
192
  # => Docker::Image { :id => 66b712aef, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
173
193
 
@@ -186,18 +206,22 @@ Docker::Image.build("from base\nrun touch /test")
186
206
  # => Docker::Image { :id => b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
187
207
 
188
208
  # Create an Image from a Dockerfile.
209
+ # docker command for reference: docker build .
189
210
  Docker::Image.build_from_dir('.')
190
211
  # => Docker::Image { :id => 1266dc19e, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
191
212
 
192
213
  # Create an Image from a tar file.
214
+ # docker command for reference: docker build - < docker_image.tar
193
215
  Docker::Image.build_from_tar(File.open('docker_image.tar', 'r'))
194
216
  # => Docker::Image { :id => 1266dc19e, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
195
217
 
196
218
  # Load all Images on your Docker server.
219
+ # docker command for reference: docker images
197
220
  Docker::Image.all
198
221
  # => [Docker::Image { :id => b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => 8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }]
199
222
 
200
223
  # Get Image from the server, with id
224
+ # docker command for reference: docker images <IMAGE.ID>
201
225
  Docker::Image.get('df4f1bdecf40')
202
226
  # => Docker::Image { :id => eb693ec80, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }
203
227
 
@@ -206,6 +230,7 @@ Docker::Image.exist?('ef723dcdac09')
206
230
  # => true
207
231
 
208
232
  # Export multiple images to a single tarball
233
+ # docker command for reference: docker save my_image1 my_image2:not_latest > my_export.tar
209
234
  names = %w( my_image1 my_image2:not_latest )
210
235
  Docker::Image.save(names, 'my_export.tar')
211
236
  # => nil
@@ -216,6 +241,7 @@ Docker::Image.save(names)
216
241
  # => "abiglongbinarystring"
217
242
 
218
243
  # Search the Docker registry.
244
+ # docker command for reference: docker search sshd
219
245
  Docker::Image.search('term' => 'sshd')
220
246
  # => [Docker::Image { :id => cespare/sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => johnfuller/sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => dhrp/mongodb-sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => rayang2004/sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => dhrp/sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => toorop/daemontools-sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => toorop/daemontools-sshd-nginx, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => toorop/daemontools-sshd-nginx-php-fpm, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => mbkan/lamp, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => toorop/golang, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => wma55/u1210sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => jdswinbank/sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }, Docker::Image { :id => vgauthier/sshd, :connection => Docker::Connection { :url => tcp://localhost, :options => {:port=>2375} } }]
221
247
  ```
@@ -16,7 +16,7 @@ class Docker::Container
16
16
  # Wait for the current command to finish executing. Default wait time is
17
17
  # `Excon.options[:read_timeout]`.
18
18
  def wait(time = nil)
19
- excon_params = { :read_timeout => time, :idempotent => true }
19
+ excon_params = { :read_timeout => time }
20
20
  resp = connection.post(path_for(:wait), nil, excon_params)
21
21
  Docker::Util.parse_json(resp)
22
22
  end
@@ -1,6 +1,6 @@
1
1
  module Docker
2
2
  # The version of the docker-api gem.
3
- VERSION = '1.22.3'
3
+ VERSION = '1.22.4'
4
4
 
5
5
  # The version of the compatible Docker remote API.
6
6
  API_VERSION = '1.16'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.22.3
4
+ version: 1.22.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swipely, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon