docker-api 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/docker/image.rb +25 -13
- data/lib/docker/util.rb +19 -1
- data/lib/docker/version.rb +1 -1
- data/spec/docker/image_spec.rb +12 -0
- data/spec/vcr/Docker_Image/_insert_local/when_there_are_multiple_files_passed/creates_a_new_Image_that_has_each_file.yml +327 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0d24fe7ee17232226259b46a172f06261fd264f
|
4
|
+
data.tar.gz: e7ad9fe5f3ffdccdbe90d41a35e27f3326e2f564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 659c3b9a38880c6ad2a3673a02f89d3619789509e51da88b105ab7791ab276e786fdaf29cf91658cf9a233402232b8416ec4d0a4622a4e147b0b23e79fe3ef53
|
7
|
+
data.tar.gz: 74e5cdf949589a4d4b87cd1e18c63e30b4ef3cd26a2b29e77f8fb88b2614d80d7ff2001707d815d19b9722c0d6edc4c90a1d9e9a06e5fe96a43de57fc28db7e3
|
data/README.md
CHANGED
@@ -102,6 +102,10 @@ image.insert('path' => '/google', 'url' => 'http://google.com')
|
|
102
102
|
image.insert_local('localPath' => 'Gemfile', 'outputPath' => '/')
|
103
103
|
# => Docker::Image { :id => 682ea192f, :connection => Docker::Connection { :url => http://localhost, :options => {:port=>4243} } }
|
104
104
|
|
105
|
+
# Insert multiple local files into an Image.
|
106
|
+
image.insert_local('localPath' => [ 'Gemfile', 'Rakefile' ], 'outputPath' => '/')
|
107
|
+
# => Docker::Image { :id => eb693ec80, :connection => Docker::Connection { :url => http://localhost, :options => {:port=>4243} } }
|
108
|
+
|
105
109
|
|
106
110
|
# Tag an Image.
|
107
111
|
image.tag('repo' => 'base2', 'force' => true)
|
data/lib/docker/image.rb
CHANGED
@@ -46,19 +46,18 @@ class Docker::Image
|
|
46
46
|
# Given a path of a local file and the path it should be inserted, creates
|
47
47
|
# a new Image that has that file.
|
48
48
|
def insert_local(opts = {})
|
49
|
-
|
49
|
+
local_paths = opts.delete('localPath')
|
50
50
|
output_path = opts.delete('outputPath')
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
end
|
51
|
+
|
52
|
+
local_paths = [ local_paths ] unless local_paths.is_a?(Array)
|
53
|
+
|
54
|
+
file_hash = Docker::Util.file_hash_from_paths(local_paths)
|
55
|
+
|
56
|
+
file_hash['Dockerfile'] = dockerfile_for(file_hash, output_path)
|
57
|
+
|
58
|
+
tar = Docker::Util.create_tar(file_hash)
|
59
|
+
body = connection.post('/build', {}, :body => tar)
|
60
|
+
self.class.send(:new, connection, Docker::Util.extract_id(body))
|
62
61
|
end
|
63
62
|
|
64
63
|
# Remove the Image from the server.
|
@@ -144,10 +143,23 @@ class Docker::Image
|
|
144
143
|
end
|
145
144
|
end
|
146
145
|
|
146
|
+
private
|
147
|
+
|
147
148
|
# Convenience method to return the path for a particular resource.
|
148
149
|
def path_for(resource)
|
149
150
|
"/images/#{self.id}/#{resource}"
|
150
151
|
end
|
151
152
|
|
152
|
-
|
153
|
+
|
154
|
+
# Convience method to get the Dockerfile for a file hash and a path to
|
155
|
+
# output to.
|
156
|
+
def dockerfile_for(file_hash, output_path)
|
157
|
+
dockerfile = "from #{self.id}"
|
158
|
+
|
159
|
+
file_hash.keys.each do |basename|
|
160
|
+
dockerfile << "add #{basename} #{output_path}"
|
161
|
+
end
|
162
|
+
|
163
|
+
dockerfile
|
164
|
+
end
|
153
165
|
end
|
data/lib/docker/util.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
module Docker::Util
|
4
4
|
include Docker::Error
|
5
5
|
|
6
|
+
module_function
|
7
|
+
|
6
8
|
def parse_json(body)
|
7
9
|
JSON.parse(body) unless body.nil? || body.empty? || (body == 'null')
|
8
10
|
rescue JSON::ParserError => ex
|
@@ -38,5 +40,21 @@ module Docker::Util
|
|
38
40
|
end
|
39
41
|
end
|
40
42
|
|
41
|
-
|
43
|
+
# Convenience method to get the file hash corresponding to an array of
|
44
|
+
# local paths.
|
45
|
+
def file_hash_from_paths(local_paths)
|
46
|
+
file_hash = {}
|
47
|
+
|
48
|
+
local_paths.each do |local_path|
|
49
|
+
if File.exist?(local_path)
|
50
|
+
basename = File.basename(local_path)
|
51
|
+
|
52
|
+
file_hash[basename] = File.read(local_path)
|
53
|
+
else
|
54
|
+
raise ArgumentError, "#{local_path} does not exist."
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
file_hash
|
59
|
+
end
|
42
60
|
end
|
data/lib/docker/version.rb
CHANGED
data/spec/docker/image_spec.rb
CHANGED
@@ -65,6 +65,18 @@ describe Docker::Image do
|
|
65
65
|
}
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
context 'when there are multiple files passed' do
|
70
|
+
let(:file) { ['./Gemfile', './Rakefile'] }
|
71
|
+
let(:gemfile) { File.read('Gemfile') }
|
72
|
+
let(:rakefile) { File.read('Rakefile') }
|
73
|
+
|
74
|
+
it 'creates a new Image that has each file', :vcr do
|
75
|
+
new_image.run('cat /Gemfile /Rakefile').start.attach do |chunk|
|
76
|
+
chunk.should == gemfile + rakefile
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
68
80
|
end
|
69
81
|
|
70
82
|
describe '#push' do
|
@@ -0,0 +1,327 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:4243/v1.4/build
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: !binary |-
|
9
|
+
RG9ja2VyZmlsZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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A=
|
55
|
+
headers:
|
56
|
+
User-Agent:
|
57
|
+
- Swipely/Docker-API 1.5.3
|
58
|
+
Content-Type:
|
59
|
+
- application/json
|
60
|
+
response:
|
61
|
+
status:
|
62
|
+
code: 200
|
63
|
+
message: ''
|
64
|
+
headers:
|
65
|
+
Content-Type:
|
66
|
+
- text/plain; charset=utf-8
|
67
|
+
Date:
|
68
|
+
- Sat, 14 Sep 2013 23:02:27 GMT
|
69
|
+
Transfer-Encoding:
|
70
|
+
- chunked
|
71
|
+
body:
|
72
|
+
encoding: UTF-8
|
73
|
+
string: "Step 1 : FROM base\nPulling repository base\r\nPulling image b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc
|
74
|
+
(ubuntu-quantl) from base\r\n ---> b750fe79269d\nSuccessfully built b750fe79269d\n"
|
75
|
+
http_version:
|
76
|
+
recorded_at: Sat, 14 Sep 2013 23:02:31 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: http://localhost:4243/v1.4/build
|
80
|
+
body:
|
81
|
+
encoding: UTF-8
|
82
|
+
string: !binary |-
|
83
|
+
R2VtZmlsZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
84
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
85
|
+
AAAAAAAAAAAAADAwMDA2NDAAMDAwMDAwMAAwMDAwMDAwADAwMDAwMDAwMDQ2
|
86
|
+
ADAwMDAwMDAwMDAwADAxMjU0NgAgMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
87
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
88
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB1c3RhcgAwMHdoZWVs
|
89
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
165
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
166
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
167
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
168
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
169
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
170
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
171
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
172
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
173
|
+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
174
|
+
AA==
|
175
|
+
headers:
|
176
|
+
User-Agent:
|
177
|
+
- Swipely/Docker-API 1.5.3
|
178
|
+
Content-Type:
|
179
|
+
- application/json
|
180
|
+
response:
|
181
|
+
status:
|
182
|
+
code: 200
|
183
|
+
message: ''
|
184
|
+
headers:
|
185
|
+
Content-Type:
|
186
|
+
- text/plain; charset=utf-8
|
187
|
+
Date:
|
188
|
+
- Sat, 14 Sep 2013 23:02:31 GMT
|
189
|
+
Transfer-Encoding:
|
190
|
+
- chunked
|
191
|
+
body:
|
192
|
+
encoding: UTF-8
|
193
|
+
string: |
|
194
|
+
Step 1 : FROM b750fe79269d
|
195
|
+
---> b750fe79269d
|
196
|
+
Step 2 : ADD Gemfile /
|
197
|
+
---> 8124a17c1581
|
198
|
+
Step 3 : ADD Rakefile /
|
199
|
+
---> ed8565d07a24
|
200
|
+
Successfully built ed8565d07a24
|
201
|
+
http_version:
|
202
|
+
recorded_at: Sat, 14 Sep 2013 23:02:31 GMT
|
203
|
+
- request:
|
204
|
+
method: post
|
205
|
+
uri: http://localhost:4243/v1.4/containers/create
|
206
|
+
body:
|
207
|
+
encoding: UTF-8
|
208
|
+
string: '{"Image":"ed8565d07a24","Cmd":["cat","/Gemfile","/Rakefile"]}'
|
209
|
+
headers:
|
210
|
+
User-Agent:
|
211
|
+
- Swipely/Docker-API 1.5.3
|
212
|
+
Content-Type:
|
213
|
+
- application/json
|
214
|
+
response:
|
215
|
+
status:
|
216
|
+
code: 201
|
217
|
+
message: ''
|
218
|
+
headers:
|
219
|
+
Content-Type:
|
220
|
+
- text/plain; charset=utf-8
|
221
|
+
Content-Length:
|
222
|
+
- '21'
|
223
|
+
Date:
|
224
|
+
- Sat, 14 Sep 2013 23:02:31 GMT
|
225
|
+
body:
|
226
|
+
encoding: UTF-8
|
227
|
+
string: '{"Id":"01b2292bf658"}'
|
228
|
+
http_version:
|
229
|
+
recorded_at: Sat, 14 Sep 2013 23:02:31 GMT
|
230
|
+
- request:
|
231
|
+
method: post
|
232
|
+
uri: http://localhost:4243/v1.4/containers/01b2292bf658/start
|
233
|
+
body:
|
234
|
+
encoding: UTF-8
|
235
|
+
string: '{}'
|
236
|
+
headers:
|
237
|
+
User-Agent:
|
238
|
+
- Swipely/Docker-API 1.5.3
|
239
|
+
Content-Type:
|
240
|
+
- application/json
|
241
|
+
response:
|
242
|
+
status:
|
243
|
+
code: 204
|
244
|
+
message: ''
|
245
|
+
headers:
|
246
|
+
Content-Type:
|
247
|
+
- text/plain; charset=utf-8
|
248
|
+
Content-Length:
|
249
|
+
- '0'
|
250
|
+
Date:
|
251
|
+
- Sat, 14 Sep 2013 23:02:31 GMT
|
252
|
+
body:
|
253
|
+
encoding: UTF-8
|
254
|
+
string: ''
|
255
|
+
http_version:
|
256
|
+
recorded_at: Sat, 14 Sep 2013 23:02:31 GMT
|
257
|
+
- request:
|
258
|
+
method: post
|
259
|
+
uri: http://localhost:4243/v1.4/containers/01b2292bf658/start
|
260
|
+
body:
|
261
|
+
encoding: UTF-8
|
262
|
+
string: '{}'
|
263
|
+
headers:
|
264
|
+
User-Agent:
|
265
|
+
- Swipely/Docker-API 1.5.3
|
266
|
+
Content-Type:
|
267
|
+
- application/json
|
268
|
+
response:
|
269
|
+
status:
|
270
|
+
code: 500
|
271
|
+
message: ''
|
272
|
+
headers:
|
273
|
+
Content-Type:
|
274
|
+
- text/plain; charset=utf-8
|
275
|
+
Content-Length:
|
276
|
+
- '138'
|
277
|
+
Date:
|
278
|
+
- Sat, 14 Sep 2013 23:02:31 GMT
|
279
|
+
body:
|
280
|
+
encoding: UTF-8
|
281
|
+
string: |
|
282
|
+
Error starting container 01b2292bf658: The container 01b2292bf6589519cb88fd1fc85b51472a5813cbba49333567cc0a129c57026b is already running.
|
283
|
+
http_version:
|
284
|
+
recorded_at: Sat, 14 Sep 2013 23:02:31 GMT
|
285
|
+
- request:
|
286
|
+
method: post
|
287
|
+
uri: http://localhost:4243/v1.4/containers/01b2292bf658/attach?stdout=true&stream=true
|
288
|
+
body:
|
289
|
+
encoding: US-ASCII
|
290
|
+
string: ''
|
291
|
+
headers:
|
292
|
+
User-Agent:
|
293
|
+
- Swipely/Docker-API 1.5.3
|
294
|
+
Content-Type:
|
295
|
+
- text/plain
|
296
|
+
response:
|
297
|
+
status:
|
298
|
+
code: 200
|
299
|
+
message: ''
|
300
|
+
headers:
|
301
|
+
Content-Type:
|
302
|
+
- application/vnd.docker.raw-stream
|
303
|
+
body:
|
304
|
+
encoding: UTF-8
|
305
|
+
string: |
|
306
|
+
source 'http://rubygems.org'
|
307
|
+
|
308
|
+
gemspec
|
309
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
310
|
+
|
311
|
+
require 'rake'
|
312
|
+
require 'docker'
|
313
|
+
require 'rspec/core/rake_task'
|
314
|
+
require 'cane/rake_task'
|
315
|
+
|
316
|
+
task :default => [:spec, :quality]
|
317
|
+
|
318
|
+
RSpec::Core::RakeTask.new do |t|
|
319
|
+
t.pattern = 'spec/**/*_spec.rb'
|
320
|
+
end
|
321
|
+
|
322
|
+
Cane::RakeTask.new(:quality) do |cane|
|
323
|
+
cane.canefile = '.cane'
|
324
|
+
end
|
325
|
+
http_version:
|
326
|
+
recorded_at: Sat, 14 Sep 2013 23:02:31 GMT
|
327
|
+
recorded_with: VCR 2.5.0
|
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.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swipely, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -214,6 +214,7 @@ files:
|
|
214
214
|
- spec/vcr/Docker_Image/_insert/inserts_the_url_s_file_into_a_new_Image.yml
|
215
215
|
- spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_exist/creates_a_new_Image_that_has_that_file.yml
|
216
216
|
- spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_not_exist/raises_an_error.yml
|
217
|
+
- spec/vcr/Docker_Image/_insert_local/when_there_are_multiple_files_passed/creates_a_new_Image_that_has_each_file.yml
|
217
218
|
- spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml
|
218
219
|
- spec/vcr/Docker_Image/_remove/removes_the_Image.yml
|
219
220
|
- spec/vcr/Docker_Image/_run/when_the_argument_is_a_String/splits_the_String_by_spaces_and_creates_a_new_Container.yml
|
@@ -286,6 +287,7 @@ test_files:
|
|
286
287
|
- spec/vcr/Docker_Image/_insert/inserts_the_url_s_file_into_a_new_Image.yml
|
287
288
|
- spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_exist/creates_a_new_Image_that_has_that_file.yml
|
288
289
|
- spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_not_exist/raises_an_error.yml
|
290
|
+
- spec/vcr/Docker_Image/_insert_local/when_there_are_multiple_files_passed/creates_a_new_Image_that_has_each_file.yml
|
289
291
|
- spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml
|
290
292
|
- spec/vcr/Docker_Image/_remove/removes_the_Image.yml
|
291
293
|
- spec/vcr/Docker_Image/_run/when_the_argument_is_a_String/splits_the_String_by_spaces_and_creates_a_new_Container.yml
|