2 # Copyright 2016-2017, whitestar
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 name 'docker-registry'
18 description 'Docker Registry'
21 'recipe[ssl_cert::ca_certs]',
22 'recipe[ssl_cert::server_key_pairs]',
24 'recipe[docker-grid::registry]',
32 registry_cn = 'registry.docker.example.com'
45 'skip_setup' => false,
48 'skip_setup' => false,
51 'with_ssl_cert_cookbook' => true,
53 'common_name' => registry_cn,
58 'restart' => 'always',
59 'image' => 'registry:2',
64 # These environment variables will be set by the docker-grid::registry recipe automatically.
65 #'REGISTRY_HTTP_TLS_CERTIFICATE' => '/certs/domain.crt',
66 #'REGISTRY_HTTP_TLS_KEY' => '/certs/domain.key',
67 'REGISTRY_AUTH' => 'htpasswd',
68 'REGISTRY_AUTH_HTPASSWD_PATH' => '/auth/.htpasswd',
69 'REGISTRY_AUTH_HTPASSWD_REALM' => 'Registry Realm',
72 # These volumes will be set by the docker-grid::registry recipe automatically.
73 #"#{server_cert_path(node['docker-grid']['registry']['ssl_cert']['common_name'])}:/certs/domain.crt:ro",
74 #"#{server_key_path(node['docker-grid']['registry']['ssl_cert']['common_name'])}:/certs/domain.key:ro",