docker-api 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,37 +2,34 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:4243/v1.
|
5
|
+
uri: http://localhost:4243/v1.4/containers/create
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"Cmd":["pwd"],"Image":"base"}'
|
9
9
|
headers:
|
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: 201
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
!binary "RGF0ZQ==":
|
26
|
-
- !binary |-
|
27
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODowOTo1MCBHTVQ=
|
19
|
+
Content-Type:
|
20
|
+
- text/plain; charset=utf-8
|
21
|
+
Content-Length:
|
22
|
+
- '21'
|
23
|
+
Date:
|
24
|
+
- Wed, 07 Aug 2013 16:51:14 GMT
|
28
25
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
26
|
+
encoding: UTF-8
|
27
|
+
string: '{"Id":"fe03763be9b4"}'
|
31
28
|
http_version:
|
32
|
-
recorded_at: Wed,
|
29
|
+
recorded_at: Wed, 07 Aug 2013 16:51:14 GMT
|
33
30
|
- request:
|
34
31
|
method: post
|
35
|
-
uri: http://localhost:4243/v1.
|
32
|
+
uri: http://localhost:4243/v1.4/containers/fe03763be9b4/start
|
36
33
|
body:
|
37
34
|
encoding: US-ASCII
|
38
35
|
string: ''
|
@@ -40,29 +37,26 @@ http_interactions:
|
|
40
37
|
Content-Type:
|
41
38
|
- text/plain
|
42
39
|
User-Agent:
|
43
|
-
- Docker-
|
40
|
+
- Swipely/Docker-API 1.3.1
|
44
41
|
response:
|
45
42
|
status:
|
46
43
|
code: 204
|
47
44
|
message: ''
|
48
45
|
headers:
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
!binary "RGF0ZQ==":
|
56
|
-
- !binary |-
|
57
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODowOTo1MCBHTVQ=
|
46
|
+
Content-Type:
|
47
|
+
- text/plain; charset=utf-8
|
48
|
+
Content-Length:
|
49
|
+
- '0'
|
50
|
+
Date:
|
51
|
+
- Wed, 07 Aug 2013 16:51:14 GMT
|
58
52
|
body:
|
59
|
-
encoding:
|
53
|
+
encoding: UTF-8
|
60
54
|
string: ''
|
61
55
|
http_version:
|
62
|
-
recorded_at: Wed,
|
56
|
+
recorded_at: Wed, 07 Aug 2013 16:51:14 GMT
|
63
57
|
- request:
|
64
58
|
method: post
|
65
|
-
uri: http://localhost:4243/v1.
|
59
|
+
uri: http://localhost:4243/v1.4/containers/fe03763be9b4/attach?stdout=true&stream=true
|
66
60
|
body:
|
67
61
|
encoding: US-ASCII
|
68
62
|
string: ''
|
@@ -70,20 +64,18 @@ http_interactions:
|
|
70
64
|
Content-Type:
|
71
65
|
- text/plain
|
72
66
|
User-Agent:
|
73
|
-
- Docker-
|
67
|
+
- Swipely/Docker-API 1.3.1
|
74
68
|
response:
|
75
69
|
status:
|
76
70
|
code: 200
|
77
71
|
message: ''
|
78
72
|
headers:
|
79
|
-
|
80
|
-
-
|
81
|
-
YXBwbGljYXRpb24vdm5kLmRvY2tlci5yYXctc3RyZWFt
|
73
|
+
Content-Type:
|
74
|
+
- application/vnd.docker.raw-stream
|
82
75
|
body:
|
83
|
-
encoding:
|
84
|
-
string:
|
85
|
-
|
86
|
-
'
|
76
|
+
encoding: UTF-8
|
77
|
+
string: |
|
78
|
+
/
|
87
79
|
http_version:
|
88
|
-
recorded_at: Wed,
|
89
|
-
recorded_with: VCR 2.
|
80
|
+
recorded_at: Wed, 07 Aug 2013 16:51:14 GMT
|
81
|
+
recorded_with: VCR 2.4.0
|
@@ -2,37 +2,34 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:4243/v1.
|
5
|
+
uri: http://localhost:4243/v1.4/containers/create
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"Cmd":["rm","-rf","/root"],"Image":"base"}'
|
9
9
|
headers:
|
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: 201
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
!binary "RGF0ZQ==":
|
26
|
-
- !binary |-
|
27
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODowOTo0NyBHTVQ=
|
19
|
+
Content-Type:
|
20
|
+
- text/plain; charset=utf-8
|
21
|
+
Content-Length:
|
22
|
+
- '21'
|
23
|
+
Date:
|
24
|
+
- Wed, 07 Aug 2013 16:51:12 GMT
|
28
25
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
26
|
+
encoding: UTF-8
|
27
|
+
string: '{"Id":"04f3e636c31d"}'
|
31
28
|
http_version:
|
32
|
-
recorded_at: Wed,
|
29
|
+
recorded_at: Wed, 07 Aug 2013 16:51:12 GMT
|
33
30
|
- request:
|
34
31
|
method: post
|
35
|
-
uri: http://localhost:4243/v1.
|
32
|
+
uri: http://localhost:4243/v1.4/containers/04f3e636c31d/start
|
36
33
|
body:
|
37
34
|
encoding: US-ASCII
|
38
35
|
string: ''
|
@@ -40,29 +37,26 @@ http_interactions:
|
|
40
37
|
Content-Type:
|
41
38
|
- text/plain
|
42
39
|
User-Agent:
|
43
|
-
- Docker-
|
40
|
+
- Swipely/Docker-API 1.3.1
|
44
41
|
response:
|
45
42
|
status:
|
46
43
|
code: 204
|
47
44
|
message: ''
|
48
45
|
headers:
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
!binary "RGF0ZQ==":
|
56
|
-
- !binary |-
|
57
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODowOTo0NyBHTVQ=
|
46
|
+
Content-Type:
|
47
|
+
- text/plain; charset=utf-8
|
48
|
+
Content-Length:
|
49
|
+
- '0'
|
50
|
+
Date:
|
51
|
+
- Wed, 07 Aug 2013 16:51:12 GMT
|
58
52
|
body:
|
59
|
-
encoding:
|
53
|
+
encoding: UTF-8
|
60
54
|
string: ''
|
61
55
|
http_version:
|
62
|
-
recorded_at: Wed,
|
56
|
+
recorded_at: Wed, 07 Aug 2013 16:51:12 GMT
|
63
57
|
- request:
|
64
58
|
method: post
|
65
|
-
uri: http://localhost:4243/v1.
|
59
|
+
uri: http://localhost:4243/v1.4/containers/04f3e636c31d/wait
|
66
60
|
body:
|
67
61
|
encoding: US-ASCII
|
68
62
|
string: ''
|
@@ -70,29 +64,26 @@ http_interactions:
|
|
70
64
|
Content-Type:
|
71
65
|
- text/plain
|
72
66
|
User-Agent:
|
73
|
-
- Docker-
|
67
|
+
- Swipely/Docker-API 1.3.1
|
74
68
|
response:
|
75
69
|
status:
|
76
70
|
code: 200
|
77
71
|
message: ''
|
78
72
|
headers:
|
79
|
-
|
80
|
-
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
!binary "RGF0ZQ==":
|
86
|
-
- !binary |-
|
87
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODowOTo0OCBHTVQ=
|
73
|
+
Content-Type:
|
74
|
+
- application/json
|
75
|
+
Content-Length:
|
76
|
+
- '16'
|
77
|
+
Date:
|
78
|
+
- Wed, 07 Aug 2013 16:51:12 GMT
|
88
79
|
body:
|
89
|
-
encoding:
|
90
|
-
string:
|
80
|
+
encoding: UTF-8
|
81
|
+
string: '{"StatusCode":0}'
|
91
82
|
http_version:
|
92
|
-
recorded_at: Wed,
|
83
|
+
recorded_at: Wed, 07 Aug 2013 16:51:12 GMT
|
93
84
|
- request:
|
94
85
|
method: get
|
95
|
-
uri: http://localhost:4243/v1.
|
86
|
+
uri: http://localhost:4243/v1.4/containers/04f3e636c31d/changes
|
96
87
|
body:
|
97
88
|
encoding: US-ASCII
|
98
89
|
string: ''
|
@@ -100,24 +91,21 @@ http_interactions:
|
|
100
91
|
Content-Type:
|
101
92
|
- text/plain
|
102
93
|
User-Agent:
|
103
|
-
- Docker-
|
94
|
+
- Swipely/Docker-API 1.3.1
|
104
95
|
response:
|
105
96
|
status:
|
106
97
|
code: 200
|
107
98
|
message: ''
|
108
99
|
headers:
|
109
|
-
|
110
|
-
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
!binary "RGF0ZQ==":
|
116
|
-
- !binary |-
|
117
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODowOTo0OCBHTVQ=
|
100
|
+
Content-Type:
|
101
|
+
- application/json
|
102
|
+
Content-Length:
|
103
|
+
- '27'
|
104
|
+
Date:
|
105
|
+
- Wed, 07 Aug 2013 16:51:12 GMT
|
118
106
|
body:
|
119
|
-
encoding:
|
120
|
-
string:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: '[{"Path":"/root","Kind":2}]'
|
121
109
|
http_version:
|
122
|
-
recorded_at: Wed,
|
123
|
-
recorded_with: VCR 2.
|
110
|
+
recorded_at: Wed, 07 Aug 2013 16:51:12 GMT
|
111
|
+
recorded_with: VCR 2.4.0
|
@@ -2,37 +2,34 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:4243/v1.
|
5
|
+
uri: http://localhost:4243/v1.4/containers/create
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"Cmd":["true"],"Image":"base"}'
|
9
9
|
headers:
|
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: 201
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
!binary "RGF0ZQ==":
|
26
|
-
- !binary |-
|
27
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODoxMDowNiBHTVQ=
|
19
|
+
Content-Type:
|
20
|
+
- text/plain; charset=utf-8
|
21
|
+
Content-Length:
|
22
|
+
- '21'
|
23
|
+
Date:
|
24
|
+
- Wed, 07 Aug 2013 16:51:31 GMT
|
28
25
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
26
|
+
encoding: UTF-8
|
27
|
+
string: '{"Id":"f46aa3aea35f"}'
|
31
28
|
http_version:
|
32
|
-
recorded_at: Wed,
|
29
|
+
recorded_at: Wed, 07 Aug 2013 16:51:31 GMT
|
33
30
|
- request:
|
34
31
|
method: post
|
35
|
-
uri: http://localhost:4243/v1.
|
32
|
+
uri: http://localhost:4243/v1.4/containers/f46aa3aea35f/start
|
36
33
|
body:
|
37
34
|
encoding: US-ASCII
|
38
35
|
string: ''
|
@@ -40,29 +37,26 @@ http_interactions:
|
|
40
37
|
Content-Type:
|
41
38
|
- text/plain
|
42
39
|
User-Agent:
|
43
|
-
- Docker-
|
40
|
+
- Swipely/Docker-API 1.3.1
|
44
41
|
response:
|
45
42
|
status:
|
46
43
|
code: 204
|
47
44
|
message: ''
|
48
45
|
headers:
|
49
|
-
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
!binary "RGF0ZQ==":
|
56
|
-
- !binary |-
|
57
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODoxMDowNiBHTVQ=
|
46
|
+
Content-Type:
|
47
|
+
- text/plain; charset=utf-8
|
48
|
+
Content-Length:
|
49
|
+
- '0'
|
50
|
+
Date:
|
51
|
+
- Wed, 07 Aug 2013 16:51:31 GMT
|
58
52
|
body:
|
59
|
-
encoding:
|
53
|
+
encoding: UTF-8
|
60
54
|
string: ''
|
61
55
|
http_version:
|
62
|
-
recorded_at: Wed,
|
56
|
+
recorded_at: Wed, 07 Aug 2013 16:51:31 GMT
|
63
57
|
- request:
|
64
58
|
method: post
|
65
|
-
uri: http://localhost:4243/v1.
|
59
|
+
uri: http://localhost:4243/v1.4/commit?container=f46aa3ae
|
66
60
|
body:
|
67
61
|
encoding: US-ASCII
|
68
62
|
string: ''
|
@@ -70,24 +64,21 @@ http_interactions:
|
|
70
64
|
Content-Type:
|
71
65
|
- text/plain
|
72
66
|
User-Agent:
|
73
|
-
- Docker-
|
67
|
+
- Swipely/Docker-API 1.3.1
|
74
68
|
response:
|
75
69
|
status:
|
76
70
|
code: 201
|
77
71
|
message: ''
|
78
72
|
headers:
|
79
|
-
|
80
|
-
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
!binary "RGF0ZQ==":
|
86
|
-
- !binary |-
|
87
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODoxMDowNiBHTVQ=
|
73
|
+
Content-Type:
|
74
|
+
- text/plain; charset=utf-8
|
75
|
+
Content-Length:
|
76
|
+
- '21'
|
77
|
+
Date:
|
78
|
+
- Wed, 07 Aug 2013 16:51:31 GMT
|
88
79
|
body:
|
89
|
-
encoding:
|
90
|
-
string:
|
80
|
+
encoding: UTF-8
|
81
|
+
string: '{"Id":"c8fab65ab6d9"}'
|
91
82
|
http_version:
|
92
|
-
recorded_at: Wed,
|
93
|
-
recorded_with: VCR 2.
|
83
|
+
recorded_at: Wed, 07 Aug 2013 16:51:31 GMT
|
84
|
+
recorded_with: VCR 2.4.0
|
@@ -2,32 +2,29 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://localhost:4243/v1.
|
5
|
+
uri: http://localhost:4243/v1.4/containers/create
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"Hostname":"","User":"","Memory":0,"MemorySwap":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":["date"],"Dns":null,"Image":"base","Volumes":{},"VolumesFrom":""}'
|
9
9
|
headers:
|
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: 201
|
17
17
|
message: ''
|
18
18
|
headers:
|
19
|
-
|
20
|
-
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
!binary "RGF0ZQ==":
|
26
|
-
- !binary |-
|
27
|
-
V2VkLCAyNiBKdW4gMjAxMyAxODoxMDowNyBHTVQ=
|
19
|
+
Content-Type:
|
20
|
+
- text/plain; charset=utf-8
|
21
|
+
Content-Length:
|
22
|
+
- '21'
|
23
|
+
Date:
|
24
|
+
- Wed, 07 Aug 2013 16:51:31 GMT
|
28
25
|
body:
|
29
|
-
encoding:
|
30
|
-
string:
|
26
|
+
encoding: UTF-8
|
27
|
+
string: '{"Id":"dd04be708f2e"}'
|
31
28
|
http_version:
|
32
|
-
recorded_at: Wed,
|
33
|
-
recorded_with: VCR 2.
|
29
|
+
recorded_at: Wed, 07 Aug 2013 16:51:31 GMT
|
30
|
+
recorded_with: VCR 2.4.0
|