Skip to content

Commit 0fa178a

Browse files
author
Matthew Fisher
committed
fix(registry): use confd templated config
A regression from #1190 was introduced where the config file used was the sample that came from dotcloud/docker-registry instead of using the confd templated config we use today. Updating the file to upstream's changes with the common layer as well as changing the reference to the file in the Dockerfile fixes this regression.
1 parent f2355a7 commit 0fa178a

2 files changed

Lines changed: 50 additions & 14 deletions

File tree

registry/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN pip install /docker-registry/depends/docker-registry-core
2828
# Install registry
2929
RUN pip install file:///docker-registry#egg=docker-registry[bugsnag]
3030

31-
ENV DOCKER_REGISTRY_CONFIG /docker-registry/config/config_sample.yml
31+
ENV DOCKER_REGISTRY_CONFIG /docker-registry/config/config.yml
3232
ENV SETTINGS_FLAVOR dev
3333

3434
# create data volume

registry/templates/config.yml

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,62 @@
11
# The `common' part is automatically included (and possibly overriden by all
22
# other flavors)
3-
common:
4-
# Bucket for storage
5-
boto_bucket: REPLACEME
3+
common: &common
4+
# Default log level is info
5+
loglevel: _env:LOGLEVEL:info
6+
# By default, the registry acts standalone (eg: doesn't query the index)
7+
standalone: _env:STANDALONE:true
8+
# The default endpoint to use (if NOT standalone) is index.docker.io
9+
index_endpoint: _env:INDEX_ENDPOINT:https://index.docker.io
10+
# Storage redirect is disabled
11+
storage_redirect: _env:STORAGE_REDIRECT
12+
# Token auth is enabled (if NOT standalone)
13+
disable_token_auth: _env:DISABLE_TOKEN_AUTH
14+
# No priv key
15+
privileged_key: _env:PRIVILEGED_KEY
16+
# No search backend
17+
search_backend: _env:SEARCH_BACKEND
18+
# SQLite search backend
19+
sqlalchemy_index_database: _env:SQLALCHEMY_INDEX_DATABASE:sqlite:////tmp/docker-registry.db
620

7-
# Google Cloud Storage Configuration
8-
# See:
9-
# https://developers.google.com/storage/docs/reference/v1/getting-startedv1#keys
10-
# for details on access and secret keys.
11-
gs_access_key: REPLACEME
12-
gs_secret_key: REPLACEME
13-
gs_secure: REPLACEME
21+
# Mirroring is not enabled
22+
mirroring:
23+
source: _env:MIRROR_SOURCE # https://registry-1.docker.io
24+
source_index: _env:MIRROR_SOURCE_INDEX # https://index.docker.io
25+
tags_cache_ttl: _env:MIRROR_TAGS_CACHE_TTL:172800 # seconds
1426

15-
# Set a random string here
16-
secret_key: {{ .deis_registry_secretKey }}
27+
# cache:
28+
# host: _env:CACHE_REDIS_HOST:localhost
29+
# port: _env:CACHE_REDIS_PORT:6379
30+
# db: 0
31+
# password: _env:CACHE_REDIS_PASSWORD
1732

33+
# Enabling LRU cache for small files
34+
# This speeds up read/write on small files
35+
# when using a remote storage backend (like S3).
36+
# cache_lru:
37+
# host: _env:CACHE_LRU_REDIS_HOST:localhost
38+
# port: _env:CACHE_LRU_REDIS_PORT:6379
39+
# db: 0
40+
# password: _env:CACHE_LRU_REDIS_PASSWORD
41+
42+
# Enabling these options makes the Registry send an email on each code Exception
43+
email_exceptions:
44+
smtp_host: _env:SMTP_HOST
45+
smtp_port: _env:SMTP_PORT:25
46+
smtp_login: _env:SMTP_LOGIN
47+
smtp_password: _env:SMTP_PASSWORD
48+
smtp_secure: _env:SMTP_SECURE:false
49+
from_addr: _env:SMTP_FROM_ADDR:docker-registry@localdomain.local
50+
to_addr: _env:SMTP_TO_ADDR:noise+dockerregistry@localdomain.local
51+
52+
# Enable bugsnag (set the API key)
53+
bugsnag: _env:BUGSNAG
1854

1955
# This is the default configuration when no flavor is specified
2056
dev:
57+
<<: *common
2158
storage: local
2259
storage_path: /data
23-
loglevel: info
2460

2561
{{ if .deis_registry_s3accessKey }}
2662
# To specify another flavor, set the environment variable SETTINGS_FLAVOR

0 commit comments

Comments
 (0)