docker-api 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/docker/container.rb +7 -0
- data/lib/docker/version.rb +2 -2
- data/spec/docker/container_spec.rb +21 -6
- data/spec/docker/image_spec.rb +1 -3
- data/spec/docker_spec.rb +2 -1
- data/spec/vcr/Docker/_info/returns_the_info_as_a_Hash.yml +12 -15
- data/spec/vcr/Docker/_validate_version/when_nothing_is_raised/validate_version_/.yml +12 -15
- data/spec/vcr/Docker/_version/returns_the_version_as_a_Hash.yml +12 -15
- data/spec/vcr/Docker_Container/_all/when_the_HTTP_response_is_a_200/materializes_each_Container_into_a_Docker_Container.yml +207 -3364
- data/spec/vcr/Docker_Container/_attach/yields_each_chunk.yml +31 -39
- data/spec/vcr/Docker_Container/_changes/returns_the_changes_as_an_array.yml +45 -57
- data/spec/vcr/Docker_Container/_commit/creates_a_new_Image_from_the_Container_s_changes.yml +34 -43
- data/spec/vcr/Docker_Container/_create/when_the_Container_does_not_yet_exist_and_the_body_is_a_Hash/when_the_HTTP_request_returns_a_200/sets_the_id.yml +13 -16
- data/spec/vcr/Docker_Container/_export/yields_each_chunk.yml +52 -47
- data/spec/vcr/Docker_Container/_json/returns_the_description_as_a_Hash.yml +24 -30
- data/spec/vcr/Docker_Container/_kill/kills_the_container.yml +121 -1712
- data/spec/vcr/Docker_Container/_restart/restarts_the_container.yml +78 -99
- data/spec/vcr/Docker_Container/_run/when_the_Container_s_command_does_not_return_status_code_of_0/raises_an_error.yml +34 -43
- data/spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/creates_a_new_container_to_run_the_specified_command.yml +90 -116
- data/spec/vcr/Docker_Container/_start/starts_the_container.yml +35 -44
- data/spec/vcr/Docker_Container/_stop/stops_the_container.yml +131 -1724
- data/spec/vcr/Docker_Container/_top/returns_the_top_commands_as_an_Array.yml +84 -0
- data/spec/vcr/Docker_Container/_wait/waits_for_the_command_to_finish.yml +34 -43
- data/spec/vcr/Docker_Container/_wait/when_an_argument_is_given/and_a_command_runs_for_too_long/raises_a_ServerError.yml +23 -29
- data/spec/vcr/Docker_Container/_wait/when_an_argument_is_given/sets_the_read_timeout_to_that_amount_of_time.yml +34 -43
- data/spec/vcr/Docker_Image/_all/materializes_each_Image_into_a_Docker_Image.yml +25 -32
- data/spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/builds_an_image.yml +43 -20
- data/spec/vcr/Docker_Image/_build/with_an_invalid_Dockerfile/throws_a_UnexpectedResponseError.yml +41 -23
- data/spec/vcr/Docker_Image/_create/when_the_Image_does_not_yet_exist_and_the_body_is_a_Hash/sets_the_id.yml +12 -16
- data/spec/vcr/Docker_Image/_history/returns_the_history_of_the_Image.yml +23 -30
- data/spec/vcr/Docker_Image/_insert/inserts_the_url_s_file_into_a_new_Image.yml +113 -99
- data/spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml +23 -30
- data/spec/vcr/Docker_Image/_remove/removes_the_Image.yml +34 -44
- data/spec/vcr/Docker_Image/_run/when_the_argument_is_a_String/splits_the_String_by_spaces_and_creates_a_new_Container.yml +42 -54
- data/spec/vcr/Docker_Image/_run/when_the_argument_is_an_Array/creates_a_new_Container.yml +42 -54
- data/spec/vcr/Docker_Image/_search/materializes_each_Image_into_a_Docker_Image.yml +15 -17
- data/spec/vcr/Docker_Image/_tag/tags_the_image_with_the_repo_name.yml +22 -29
- metadata +4 -6
- data/spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/builds_the_image.yml +0 -124
- data/spec/vcr/Docker_Image/_import/when_the_file_does_exist/creates_the_Image.yml +0 -35
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://localhost:4243/v1.
|
5
|
+
uri: http://localhost:4243/v1.4/images/search?term=sshd
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -10,24 +10,21 @@ http_interactions:
|
|
10
10
|
Content-Type:
|
11
11
|
- text/plain
|
12
12
|
User-Agent:
|
13
|
-
- Docker-
|
13
|
+
- Swipely/Docker-API 1.3.1
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
|
-
message:
|
17
|
+
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
!binary "RGF0ZQ==":
|
26
|
-
- !binary |-
|
27
|
-
V2VkLCAyNiBKdW4gMjAxMyAyMDozNjo0MiBHTVQ=
|
19
|
+
Content-Type:
|
20
|
+
- application/json
|
21
|
+
Content-Length:
|
22
|
+
- '1798'
|
23
|
+
Date:
|
24
|
+
- Wed, 07 Aug 2013 16:52:53 GMT
|
28
25
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
26
|
+
encoding: UTF-8
|
27
|
+
string: '[{"Name":"cespare/sshd","Description":""},{"Name":"johnfuller/sshd","Description":""},{"Name":"dhrp/mongodb-sshd","Description":""},{"Name":"rayang2004/sshd","Description":""},{"Name":"dhrp/sshd","Description":"SSH
|
31
28
|
Daemon created in the ssh daemon documentation example"},{"Name":"toorop/daemontools-sshd","Description":"sshd
|
32
29
|
daemon supervised by DJB daemontools - run cmd :\r\ndocker run -d -p 22 toorop/daemontools-sshd
|
33
30
|
/usr/bin/svscanboot - \r\n\r\nDefault root password : demo - \r\n\r\nSSHD
|
@@ -41,7 +38,8 @@ http_interactions:
|
|
41
38
|
for Go developers - Go 1.1 + Git + sshd - run with \"docker run -d -p 22 -h
|
42
39
|
toorop/golang /usr/bin/svscanboot\" - connect throw SSH \"ssh root@localhost
|
43
40
|
-pSSHD_PORT\" default password is \"demo\" - add users : \"adduser USERNAME\"
|
44
|
-
this will also configure USER $HOME directory - Start coding. Enjoy ;)"},{"Name":"wma55/u1210sshd","Description":""},{"Name":"jdswinbank/sshd","Description":""},{"Name":"vgauthier/sshd","Description":""}
|
41
|
+
this will also configure USER $HOME directory - Start coding. Enjoy ;)"},{"Name":"wma55/u1210sshd","Description":""},{"Name":"jdswinbank/sshd","Description":""},{"Name":"vgauthier/sshd","Description":""},{"Name":"pshouse/sshd-pharo-core","Description":"Provides
|
42
|
+
access to pharo-core command line interface"},{"Name":"dongweiming/sshd","Description":""},{"Name":"kpelykh/sshd","Description":""},{"Name":"oss17888/sshd","Description":""}]'
|
45
43
|
http_version:
|
46
|
-
recorded_at: Wed,
|
47
|
-
recorded_with: VCR 2.
|
44
|
+
recorded_at: Wed, 07 Aug 2013 16:52:53 GMT
|
45
|
+
recorded_with: VCR 2.4.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:4243/v1.
|
5
|
+
uri: http://localhost:4243/v1.4/images/create?fromImage=base
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -10,31 +10,27 @@ http_interactions:
|
|
10
10
|
Content-Type:
|
11
11
|
- text/plain
|
12
12
|
User-Agent:
|
13
|
-
- Docker-
|
13
|
+
- Swipely/Docker-API 1.3.1
|
14
14
|
response:
|
15
15
|
status:
|
16
16
|
code: 200
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
26
|
-
- !binary |-
|
27
|
-
Y2h1bmtlZA==
|
19
|
+
Content-Type:
|
20
|
+
- application/json
|
21
|
+
Date:
|
22
|
+
- Wed, 07 Aug 2013 16:51:37 GMT
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
28
25
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
31
|
-
image 27cf784147099545 () from base"}{"status":"Pulling image b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc
|
26
|
+
encoding: UTF-8
|
27
|
+
string: '{"status":"Pulling repository base"}{"status":"Pulling image b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc
|
32
28
|
(ubuntu-quantl) from base"}'
|
33
29
|
http_version:
|
34
|
-
recorded_at: Wed,
|
30
|
+
recorded_at: Wed, 07 Aug 2013 16:51:39 GMT
|
35
31
|
- request:
|
36
32
|
method: post
|
37
|
-
uri: http://localhost:4243/v1.
|
33
|
+
uri: http://localhost:4243/v1.4/images/base/tag?force=true&repo=base2
|
38
34
|
body:
|
39
35
|
encoding: US-ASCII
|
40
36
|
string: ''
|
@@ -42,24 +38,21 @@ http_interactions:
|
|
42
38
|
Content-Type:
|
43
39
|
- text/plain
|
44
40
|
User-Agent:
|
45
|
-
- Docker-
|
41
|
+
- Swipely/Docker-API 1.3.1
|
46
42
|
response:
|
47
43
|
status:
|
48
44
|
code: 201
|
49
45
|
message: ''
|
50
46
|
headers:
|
51
|
-
|
52
|
-
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
!binary "RGF0ZQ==":
|
58
|
-
- !binary |-
|
59
|
-
V2VkLCAyNiBKdW4gMjAxMyAyMToyMDoyNiBHTVQ=
|
47
|
+
Content-Type:
|
48
|
+
- text/plain; charset=utf-8
|
49
|
+
Content-Length:
|
50
|
+
- '0'
|
51
|
+
Date:
|
52
|
+
- Wed, 07 Aug 2013 16:51:39 GMT
|
60
53
|
body:
|
61
|
-
encoding:
|
54
|
+
encoding: UTF-8
|
62
55
|
string: ''
|
63
56
|
http_version:
|
64
|
-
recorded_at: Wed,
|
65
|
-
recorded_with: VCR 2.
|
57
|
+
recorded_at: Wed, 07 Aug 2013 16:51:39 GMT
|
58
|
+
recorded_with: VCR 2.4.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.
|
4
|
+
version: 1.4.0
|
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-08-
|
11
|
+
date: 2013-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -198,16 +198,15 @@ files:
|
|
198
198
|
- spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/creates_a_new_container_to_run_the_specified_command.yml
|
199
199
|
- spec/vcr/Docker_Container/_start/starts_the_container.yml
|
200
200
|
- spec/vcr/Docker_Container/_stop/stops_the_container.yml
|
201
|
+
- spec/vcr/Docker_Container/_top/returns_the_top_commands_as_an_Array.yml
|
201
202
|
- spec/vcr/Docker_Container/_wait/waits_for_the_command_to_finish.yml
|
202
203
|
- spec/vcr/Docker_Container/_wait/when_an_argument_is_given/and_a_command_runs_for_too_long/raises_a_ServerError.yml
|
203
204
|
- spec/vcr/Docker_Container/_wait/when_an_argument_is_given/sets_the_read_timeout_to_that_amount_of_time.yml
|
204
205
|
- spec/vcr/Docker_Image/_all/materializes_each_Image_into_a_Docker_Image.yml
|
205
206
|
- spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/builds_an_image.yml
|
206
207
|
- spec/vcr/Docker_Image/_build/with_an_invalid_Dockerfile/throws_a_UnexpectedResponseError.yml
|
207
|
-
- spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/builds_the_image.yml
|
208
208
|
- spec/vcr/Docker_Image/_create/when_the_Image_does_not_yet_exist_and_the_body_is_a_Hash/sets_the_id.yml
|
209
209
|
- spec/vcr/Docker_Image/_history/returns_the_history_of_the_Image.yml
|
210
|
-
- spec/vcr/Docker_Image/_import/when_the_file_does_exist/creates_the_Image.yml
|
211
210
|
- spec/vcr/Docker_Image/_insert/inserts_the_url_s_file_into_a_new_Image.yml
|
212
211
|
- spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml
|
213
212
|
- spec/vcr/Docker_Image/_remove/removes_the_Image.yml
|
@@ -264,16 +263,15 @@ test_files:
|
|
264
263
|
- spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/creates_a_new_container_to_run_the_specified_command.yml
|
265
264
|
- spec/vcr/Docker_Container/_start/starts_the_container.yml
|
266
265
|
- spec/vcr/Docker_Container/_stop/stops_the_container.yml
|
266
|
+
- spec/vcr/Docker_Container/_top/returns_the_top_commands_as_an_Array.yml
|
267
267
|
- spec/vcr/Docker_Container/_wait/waits_for_the_command_to_finish.yml
|
268
268
|
- spec/vcr/Docker_Container/_wait/when_an_argument_is_given/and_a_command_runs_for_too_long/raises_a_ServerError.yml
|
269
269
|
- spec/vcr/Docker_Container/_wait/when_an_argument_is_given/sets_the_read_timeout_to_that_amount_of_time.yml
|
270
270
|
- spec/vcr/Docker_Image/_all/materializes_each_Image_into_a_Docker_Image.yml
|
271
271
|
- spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/builds_an_image.yml
|
272
272
|
- spec/vcr/Docker_Image/_build/with_an_invalid_Dockerfile/throws_a_UnexpectedResponseError.yml
|
273
|
-
- spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/builds_the_image.yml
|
274
273
|
- spec/vcr/Docker_Image/_create/when_the_Image_does_not_yet_exist_and_the_body_is_a_Hash/sets_the_id.yml
|
275
274
|
- spec/vcr/Docker_Image/_history/returns_the_history_of_the_Image.yml
|
276
|
-
- spec/vcr/Docker_Image/_import/when_the_file_does_exist/creates_the_Image.yml
|
277
275
|
- spec/vcr/Docker_Image/_insert/inserts_the_url_s_file_into_a_new_Image.yml
|
278
276
|
- spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml
|
279
277
|
- spec/vcr/Docker_Image/_remove/removes_the_Image.yml
|
@@ -1,124 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://localhost:4243/v1.3/build
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- application/tar
|
12
|
-
User-Agent:
|
13
|
-
- Docker-Client/0.4.6
|
14
|
-
Transfer-Encoding:
|
15
|
-
- chunked
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
!binary "Q29udGVudC1UeXBl":
|
22
|
-
- !binary |-
|
23
|
-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
|
24
|
-
!binary "RGF0ZQ==":
|
25
|
-
- !binary |-
|
26
|
-
V2VkLCAyNiBKdW4gMjAxMyAyMToxODoxOCBHTVQ=
|
27
|
-
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
28
|
-
- !binary |-
|
29
|
-
Y2h1bmtlZA==
|
30
|
-
body:
|
31
|
-
encoding: US-ASCII
|
32
|
-
string: ! "Step 1 : FROM base\n ---> b750fe79269d\nStep 2 : ADD / /\n ---> e8bc17fbac42\nSuccessfully
|
33
|
-
built e8bc17fbac42\n"
|
34
|
-
http_version:
|
35
|
-
recorded_at: Wed, 26 Jun 2013 21:18:18 GMT
|
36
|
-
- request:
|
37
|
-
method: post
|
38
|
-
uri: http://localhost:4243/v1.3/containers/create
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: ! '{"Image":"e8bc17fbac42","Cmd":["cat","/Dockerfile"]}'
|
42
|
-
headers:
|
43
|
-
Content-Type:
|
44
|
-
- text/plain
|
45
|
-
User-Agent:
|
46
|
-
- Docker-Client/0.4.6
|
47
|
-
response:
|
48
|
-
status:
|
49
|
-
code: 201
|
50
|
-
message:
|
51
|
-
headers:
|
52
|
-
!binary "Q29udGVudC1UeXBl":
|
53
|
-
- !binary |-
|
54
|
-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
|
55
|
-
!binary "Q29udGVudC1MZW5ndGg=":
|
56
|
-
- !binary |-
|
57
|
-
MjE=
|
58
|
-
!binary "RGF0ZQ==":
|
59
|
-
- !binary |-
|
60
|
-
V2VkLCAyNiBKdW4gMjAxMyAyMToxODoxOCBHTVQ=
|
61
|
-
body:
|
62
|
-
encoding: US-ASCII
|
63
|
-
string: ! '{"Id":"1c4bd1440fac"}'
|
64
|
-
http_version:
|
65
|
-
recorded_at: Wed, 26 Jun 2013 21:18:18 GMT
|
66
|
-
- request:
|
67
|
-
method: post
|
68
|
-
uri: http://localhost:4243/v1.3/containers/1c4bd1440fac/start
|
69
|
-
body:
|
70
|
-
encoding: US-ASCII
|
71
|
-
string: ''
|
72
|
-
headers:
|
73
|
-
Content-Type:
|
74
|
-
- text/plain
|
75
|
-
User-Agent:
|
76
|
-
- Docker-Client/0.4.6
|
77
|
-
response:
|
78
|
-
status:
|
79
|
-
code: 204
|
80
|
-
message:
|
81
|
-
headers:
|
82
|
-
!binary "Q29udGVudC1UeXBl":
|
83
|
-
- !binary |-
|
84
|
-
dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
|
85
|
-
!binary "Q29udGVudC1MZW5ndGg=":
|
86
|
-
- !binary |-
|
87
|
-
MA==
|
88
|
-
!binary "RGF0ZQ==":
|
89
|
-
- !binary |-
|
90
|
-
V2VkLCAyNiBKdW4gMjAxMyAyMToxODoxOCBHTVQ=
|
91
|
-
body:
|
92
|
-
encoding: US-ASCII
|
93
|
-
string: ''
|
94
|
-
http_version:
|
95
|
-
recorded_at: Wed, 26 Jun 2013 21:18:18 GMT
|
96
|
-
- request:
|
97
|
-
method: post
|
98
|
-
uri: http://localhost:4243/v1.3/containers/1c4bd1440fac/attach?stream=true&stdout=true&stderr=true
|
99
|
-
body:
|
100
|
-
encoding: US-ASCII
|
101
|
-
string: ''
|
102
|
-
headers:
|
103
|
-
Content-Type:
|
104
|
-
- text/plain
|
105
|
-
User-Agent:
|
106
|
-
- Docker-Client/0.4.6
|
107
|
-
response:
|
108
|
-
status:
|
109
|
-
code: 200
|
110
|
-
message:
|
111
|
-
headers:
|
112
|
-
!binary "Q29udGVudC1UeXBl":
|
113
|
-
- !binary |-
|
114
|
-
YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt
|
115
|
-
body:
|
116
|
-
encoding: US-ASCII
|
117
|
-
string: ! 'from base
|
118
|
-
|
119
|
-
add / /
|
120
|
-
|
121
|
-
'
|
122
|
-
http_version:
|
123
|
-
recorded_at: Wed, 26 Jun 2013 21:18:19 GMT
|
124
|
-
recorded_with: VCR 2.5.0
|
@@ -1,35 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://localhost:4243/v1.3/images/create?fromSrc=-
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Content-Type:
|
11
|
-
- text/plain
|
12
|
-
User-Agent:
|
13
|
-
- Docker-Client/0.4.6
|
14
|
-
Transfer-Encoding:
|
15
|
-
- chunked
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message:
|
20
|
-
headers:
|
21
|
-
!binary "Q29udGVudC1UeXBl":
|
22
|
-
- !binary |-
|
23
|
-
YXBwbGljYXRpb24vanNvbg==
|
24
|
-
!binary "Q29udGVudC1MZW5ndGg=":
|
25
|
-
- !binary |-
|
26
|
-
MjU=
|
27
|
-
!binary "RGF0ZQ==":
|
28
|
-
- !binary |-
|
29
|
-
V2VkLCAyNiBKdW4gMjAxMyAyMDozMTozNyBHTVQ=
|
30
|
-
body:
|
31
|
-
encoding: US-ASCII
|
32
|
-
string: ! '{"status":"3cda7f738ab5"}'
|
33
|
-
http_version:
|
34
|
-
recorded_at: Wed, 26 Jun 2013 20:31:37 GMT
|
35
|
-
recorded_with: VCR 2.5.0
|