docker-registry-sync 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/docker-registry-sync +9 -1
- data/lib/docker/registry/sync/cmd.rb +17 -3
- data/lib/docker/registry/sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmE2Y2JjZmM2M2QxZTJjMjYwZWQ5NmQwZDQxY2UyOWIxNTdiMjNiMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzVkZGU0YTcyNDY5MzEyMWI3NTQxYjI5OTU5MTg3ZWIxZmUwMTgyOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2JlNTQ5Y2U1ZGI1OTg2OTJmMjkyM2RkYjJiZjMwNWQxYjljZDg3ZmM1YTJm
|
10
|
+
ZjBlZjQ4ODQ3NDcwODBhZTBmNmI5NGNjMThmMjc5ZmM0ZGNhNTA1YzMwMDA1
|
11
|
+
MWUyM2FhYjdmNTE1NGIwNzYyOTBmNzhjN2EwOTc4YjBhNTc2NjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzRkNmM3NDZiYmU0OTA1MTNkNDQxNWViYzY1YzE3NzU4ODZhMmY4NmY2YmVk
|
14
|
+
MzBlNGFhZTJiNWZhNjAxMDQ3NWUzMjYwNDlhNWNiYWEwZjgzMGI2MjllM2Fj
|
15
|
+
MTc1NTY3ZTRmYWE1NGQ5MjYxYTVkNWRjNmZkYTEyNjk4NWU5NzI=
|
data/bin/docker-registry-sync
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'optparse'
|
3
3
|
require 'docker/registry/sync'
|
4
|
+
require 'aws-sdk'
|
4
5
|
|
5
6
|
include Docker::Registry::Sync
|
6
7
|
|
@@ -63,13 +64,20 @@ if cmd.nil?
|
|
63
64
|
end
|
64
65
|
|
65
66
|
image = ARGV[1]
|
66
|
-
if image.nil? &&
|
67
|
+
if image.nil? && 'run-sync' != cmd
|
67
68
|
puts "Image and tag to sync must be supplied!\n\n"
|
68
69
|
puts opt_parser
|
69
70
|
exit 1
|
70
71
|
end
|
71
72
|
|
72
73
|
ENV['http_proxy'] = nil if options[:unset_proxy]
|
74
|
+
ENV['https_proxy'] = nil if options[:unset_proxy]
|
75
|
+
ENV['HTTP_PROXY'] = nil if options[:unset_proxy]
|
76
|
+
ENV['HTTPS_PROXY'] = nil if options[:unset_proxy]
|
77
|
+
|
78
|
+
if !(ENV['http_proxy'].nil? || options[:unset_proxy])
|
79
|
+
Aws.config[:http_proxy] = ENV['http_proxy']
|
80
|
+
end
|
73
81
|
|
74
82
|
unless verify_opts(options, cmd)
|
75
83
|
puts "Both '--source-bucket' and '--target-buckets' must be defined for 'sync' and 'queue-sync' commands\n"
|
@@ -10,9 +10,23 @@ module Docker
|
|
10
10
|
|
11
11
|
class << self
|
12
12
|
def configure(source_bucket, target_buckets, sqs_queue)
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
unless source_bucket.nil?
|
14
|
+
source_region, source_bucket = source_bucket.split(':')
|
15
|
+
else
|
16
|
+
source_region, source_bucket = nil, nil
|
17
|
+
end
|
18
|
+
|
19
|
+
unless target_buckets.nil?
|
20
|
+
target_buckets = target_buckets.split(',').collect { |bucket| bucket.split(':') }
|
21
|
+
else
|
22
|
+
target_buckets = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
unless sqs_queue.nil?
|
26
|
+
sqs_region, sqs_uri = sqs_queue.split(':')
|
27
|
+
else
|
28
|
+
sqs_region, sqs_uri = nil, nil
|
29
|
+
end
|
16
30
|
Docker::Registry::Sync.configure do |config|
|
17
31
|
config.source_bucket = source_bucket
|
18
32
|
config.source_region = source_region
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-registry-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Oldfield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|