docker-api 1.33.4 → 1.33.5
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 +5 -2
- data/lib/docker/util.rb +2 -2
- data/lib/docker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feaf132a5bd3b3aa9bd58bd2f0741135cedc676f
|
4
|
+
data.tar.gz: 4298604d6b131a80e6d2be772c7730b474a415d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5959dd544f98292d00b4c81ecc18292f1f152a12840109b56bdbb948bba7c1ad9755120822c8edd1ae680f9699bdc7946c8fd09e59749982c419bff71433e81
|
7
|
+
data.tar.gz: 82e462599091c8234f832ad5fa7d7739b7826161a05784862e756d2a512686f7466e199c2a2c6888c60ff0dde17aea55b5478475d41b646e482f8a90e231a02a
|
data/README.md
CHANGED
@@ -130,6 +130,10 @@ Docker.info
|
|
130
130
|
# docker command for reference: docker login
|
131
131
|
Docker.authenticate!('username' => 'docker-fan-boi', 'password' => 'i<3docker', 'email' => 'dockerboy22@aol.com')
|
132
132
|
# => true
|
133
|
+
|
134
|
+
# docker command for reference: docker login registry.gitlab.com
|
135
|
+
Docker.authenticate!('username' => 'docker-fan-boi', 'password' => 'i<3docker', 'email' => 'dockerboy22@aol.com', 'serveraddress' => 'https://registry.gitlab.com/v1/')
|
136
|
+
# => true
|
133
137
|
```
|
134
138
|
|
135
139
|
## Images
|
data/lib/docker/image.rb
CHANGED
@@ -12,11 +12,11 @@ class Docker::Image
|
|
12
12
|
begin
|
13
13
|
Docker::Container.create(opts, connection)
|
14
14
|
.tap(&:start!)
|
15
|
-
rescue ServerError => ex
|
15
|
+
rescue ServerError, ClientError => ex
|
16
16
|
if cmd
|
17
17
|
raise ex
|
18
18
|
else
|
19
|
-
raise
|
19
|
+
raise ex, "No command specified."
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -117,7 +117,10 @@ class Docker::Image
|
|
117
117
|
:headers => headers,
|
118
118
|
:response_block => response_block(body, &block)
|
119
119
|
)
|
120
|
+
# NOTE: see associated tests for why we're looking at image#end_with?
|
120
121
|
image = opts['fromImage'] || opts[:fromImage]
|
122
|
+
tag = opts['tag'] || opts[:tag]
|
123
|
+
image = "#{image}:#{tag}" if tag && !image.end_with?(":#{tag}")
|
121
124
|
get(image, {}, conn)
|
122
125
|
end
|
123
126
|
|
data/lib/docker/util.rb
CHANGED
@@ -233,7 +233,7 @@ module Docker::Util
|
|
233
233
|
|
234
234
|
def build_auth_header(credentials)
|
235
235
|
credentials = credentials.to_json if credentials.is_a?(Hash)
|
236
|
-
encoded_creds = Base64.
|
236
|
+
encoded_creds = Base64.urlsafe_encode64(credentials)
|
237
237
|
{
|
238
238
|
'X-Registry-Auth' => encoded_creds
|
239
239
|
}
|
@@ -251,7 +251,7 @@ module Docker::Util
|
|
251
251
|
}
|
252
252
|
}.to_json
|
253
253
|
|
254
|
-
encoded_header = Base64.
|
254
|
+
encoded_header = Base64.urlsafe_encode64(header)
|
255
255
|
|
256
256
|
{
|
257
257
|
'X-Registry-Config' => encoded_header
|
data/lib/docker/version.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: 1.33.
|
4
|
+
version: 1.33.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swipely, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|