Module: Dapp::Dimg::DockerRegistry
- Defined in:
- lib/dapp/dimg/docker_registry.rb,
lib/dapp/dimg/docker_registry/base.rb,
lib/dapp/dimg/docker_registry/dimg.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.new(dapp, repo) ⇒ Object
4 5 6 |
# File 'lib/dapp/dimg/docker_registry.rb', line 4 def self.new(dapp, repo) Dimg.new(dapp, repo) end |
.repo_name?(name) ⇒ Boolean
14 15 16 |
# File 'lib/dapp/dimg/docker_registry.rb', line 14 def self.repo_name?(name) !(/^#{repo_name_format}$/ =~ name).nil? end |
.repo_name_format ⇒ Object
8 9 10 11 12 |
# File 'lib/dapp/dimg/docker_registry.rb', line 8 def self.repo_name_format rpart = '[a-z0-9]+(([_.]|__|-+)[a-z0-9]+)*' hpart = '(?!-)[a-z0-9-]+(?<!-)' "(?<hostname>#{hpart}(\\.#{hpart})*(?<port>:[0-9]+)?\/)?(?<repo_suffix>#{rpart}(\/#{rpart})*)" end |