docker-api 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker/base.rb +2 -0
- data/lib/docker/connection.rb +2 -0
- data/lib/docker/container.rb +2 -0
- data/lib/docker/error.rb +2 -0
- data/lib/docker/event.rb +2 -0
- data/lib/docker/exec.rb +2 -0
- data/lib/docker/image.rb +9 -7
- data/lib/docker/messages.rb +2 -0
- data/lib/docker/messages_stack.rb +2 -0
- data/lib/docker/network.rb +2 -0
- data/lib/docker/rake_task.rb +2 -0
- data/lib/docker/util.rb +2 -0
- data/lib/docker/version.rb +3 -1
- data/lib/docker/volume.rb +2 -0
- data/lib/docker-api.rb +2 -0
- data/lib/docker.rb +2 -0
- data/lib/excon/middlewares/hijack.rb +2 -0
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8c844030bda8d245234ddd5d977ad5202b9a2f0a2e34175579790d79e6f584b
|
4
|
+
data.tar.gz: 5b793f7689d091a8a765853511e4f0f8f495338250cdec62bce30fc7a83d5117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5ce08a8dfbe1e5377ceb62d8186e4973ca6f7fa8d166bd9177f8f4a3338dc2dfeb3d735d3c54e31b15373f4124cc87d509d369a34e0f1598291105a4593947f
|
7
|
+
data.tar.gz: d27a38af366bbb20febcc3699238a56f5c52d24394780c25d3caf72bc6f9314fb8bae6dd9c7f53cd5ff30558f5bbc353d22fc9f236913a2d8786488c9a702aea
|
data/lib/docker/base.rb
CHANGED
data/lib/docker/connection.rb
CHANGED
data/lib/docker/container.rb
CHANGED
data/lib/docker/error.rb
CHANGED
data/lib/docker/event.rb
CHANGED
data/lib/docker/exec.rb
CHANGED
data/lib/docker/image.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# This class represents a Docker Image.
|
2
4
|
class Docker::Image
|
3
5
|
include Docker::Base
|
@@ -28,7 +30,7 @@ class Docker::Image
|
|
28
30
|
repo, tag = Docker::Util.parse_repo_tag(repo_tag)
|
29
31
|
raise ArgumentError, "Image does not have a name to push." if repo.nil?
|
30
32
|
|
31
|
-
body = ""
|
33
|
+
body = +""
|
32
34
|
credentials = creds || Docker.creds || {}
|
33
35
|
headers = Docker::Util.build_auth_header(credentials)
|
34
36
|
opts = {:tag => tag}.merge(options)
|
@@ -119,7 +121,7 @@ class Docker::Image
|
|
119
121
|
def create(opts = {}, creds = nil, conn = Docker.connection, &block)
|
120
122
|
credentials = creds.nil? ? Docker.creds : MultiJson.dump(creds)
|
121
123
|
headers = credentials && Docker::Util.build_auth_header(credentials) || {}
|
122
|
-
body = ''
|
124
|
+
body = +''
|
123
125
|
conn.post(
|
124
126
|
'/images/create',
|
125
127
|
opts,
|
@@ -168,7 +170,7 @@ class Docker::Image
|
|
168
170
|
end
|
169
171
|
nil
|
170
172
|
else
|
171
|
-
string = ''
|
173
|
+
string = +''
|
172
174
|
save_stream(names, {}, conn, &response_block_for_save(string))
|
173
175
|
string
|
174
176
|
end
|
@@ -196,7 +198,7 @@ class Docker::Image
|
|
196
198
|
def load(tar, opts = {}, conn = Docker.connection, creds = nil, &block)
|
197
199
|
headers = build_headers(creds)
|
198
200
|
io = tar.is_a?(String) ? File.open(tar, 'rb') : tar
|
199
|
-
body = ""
|
201
|
+
body = +""
|
200
202
|
conn.post(
|
201
203
|
'/images/load',
|
202
204
|
opts,
|
@@ -267,7 +269,7 @@ class Docker::Image
|
|
267
269
|
|
268
270
|
# Given a Dockerfile as a string, builds an Image.
|
269
271
|
def build(commands, opts = {}, connection = Docker.connection, &block)
|
270
|
-
body = ""
|
272
|
+
body = +""
|
271
273
|
connection.post(
|
272
274
|
'/build', opts,
|
273
275
|
:body => Docker::Util.create_tar('Dockerfile' => commands),
|
@@ -288,7 +290,7 @@ class Docker::Image
|
|
288
290
|
headers = build_headers(creds)
|
289
291
|
|
290
292
|
# The response_block passed to Excon will build up this body variable.
|
291
|
-
body = ""
|
293
|
+
body = +""
|
292
294
|
connection.post(
|
293
295
|
'/build', opts,
|
294
296
|
:headers => headers,
|
@@ -340,7 +342,7 @@ class Docker::Image
|
|
340
342
|
# Convience method to get the Dockerfile for a file hash and a path to
|
341
343
|
# output to.
|
342
344
|
def dockerfile_for(file_hash, output_path)
|
343
|
-
dockerfile = "from #{self.id}\n"
|
345
|
+
dockerfile = +"from #{self.id}\n"
|
344
346
|
|
345
347
|
file_hash.keys.each do |basename|
|
346
348
|
dockerfile << "add #{basename} #{output_path}\n"
|
data/lib/docker/messages.rb
CHANGED
data/lib/docker/network.rb
CHANGED
data/lib/docker/rake_task.rb
CHANGED
data/lib/docker/util.rb
CHANGED
data/lib/docker/version.rb
CHANGED
data/lib/docker/volume.rb
CHANGED
data/lib/docker-api.rb
CHANGED
data/lib/docker.rb
CHANGED
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: 2.
|
4
|
+
version: 2.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: 2024-
|
11
|
+
date: 2024-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: cane
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: pry
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|