{"id":13393587,"url":"https://github.com/docker-archive/docker-registry","last_synced_at":"2025-09-27T08:30:55.710Z","repository":{"id":8050434,"uuid":"9461481","full_name":"docker-archive/docker-registry","owner":"docker-archive","description":"This is **DEPRECATED**! Please go to https://github.com/docker/distribution","archived":true,"fork":false,"pushed_at":"2015-07-29T18:14:15.000Z","size":6052,"stargazers_count":2882,"open_issues_count":190,"forks_count":879,"subscribers_count":189,"default_branch":"master","last_synced_at":"2024-10-29T14:23:54.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docker-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-16T01:04:54.000Z","updated_at":"2024-10-27T10:13:02.000Z","dependencies_parsed_at":"2022-08-25T06:20:27.125Z","dependency_job_id":null,"html_url":"https://github.com/docker-archive/docker-registry","commit_stats":null,"previous_names":["docker/docker-registry"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-archive%2Fdocker-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-archive%2Fdocker-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-archive%2Fdocker-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-archive%2Fdocker-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docker-archive","download_url":"https://codeload.github.com/docker-archive/docker-registry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234410679,"owners_count":18828266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T17:00:56.498Z","updated_at":"2025-09-27T08:30:55.120Z","avatar_url":"https://github.com/docker-archive.png","language":"Python","funding_links":[],"categories":["registry","Python","others"],"sub_categories":[],"readme":"WARNING\n===============\n\n\u003e **Notice:** *The classical python \"Docker Registry\" is deprecated, in favor of a new golang implementation. This here is kept for historical purpose, and will not receive any significant work/love any more.  You should head to [the landing page of the new registry](https://docs.docker.com/registry) or  [the \"Distribution\" github project](https://github.com/docker/distribution) instead.*\n\nDocker-Registry\n===============\n\n[![Build Status](https://travis-ci.org/docker/docker-registry.png)](https://travis-ci.org/docker/docker-registry)\n\nAbout this document\n===================\n\nAs the documentation evolves with different registry versions, be sure that before reading any further you:\n\n * check which version of the registry you are running\n * switch to the corresponding tag to access the README that matches your product version\n\nThe stable, released version is the [0.9.1 tag](https://github.com/docker/docker-registry/tree/0.9.1).\n\nPlease also have a quick look at the [FAQ](FAQ.md) before reporting bugs.\n\n# Table of Contents\n- [Quick Start](#quick-start)\n- [Configuration mechanism overview](#configuration-mechanism-overview)\n- [Configuration flavors](#configuration-flavors)\n  - [Example config](#example-config)\n- [Available configuration options](#available-configuration-options)\n  - [General options](#general-options)\n    - [Authentication options](#authentication-options)\n    - [Search-engine options](#search-engine-options)\n      - [sqlalchemy](#sqlalchemy)\n    - [Mirroring Options](#mirroring-options)\n    - [Cache options](#cache-options)\n    - [Storage options](#storage-options)\n      - [storage file](#storage-file)\n        - [Persistent storage](#persistent-storage)\n      - [storage s3](#storage-s3)\n- [Your own config](#your-own-config)\n- [Advanced use](#advanced-user)\n- [Drivers](#drivers)\n- [For developers](#for-developers)\n\n# Quick start\n\nThe fastest way to get running:\n\n * [install docker](https://docs.docker.com/installation/#installation)\n * run the registry: `docker run -p 5000:5000 registry`\n\nThat will use the [official image from the Docker hub](https://registry.hub.docker.com/_/registry/).\n\nHere is a slightly more complex example that launches a registry on port 5000, using an Amazon S3 bucket to store images with a custom path, and enables the search endpoint:\n\n```\ndocker run \\\n         -e SETTINGS_FLAVOR=s3 \\\n         -e AWS_BUCKET=mybucket \\\n         -e STORAGE_PATH=/registry \\\n         -e AWS_KEY=myawskey \\\n         -e AWS_SECRET=myawssecret \\\n         -e SEARCH_BACKEND=sqlalchemy \\\n         -p 5000:5000 \\\n         registry\n```\n\n\n# Configuration mechanism overview\n\nBy default, the registry will use the [config_sample.yml](config/config_sample.yml) configuration to start.\n\nIndividual configuration options from that file may be overridden using environment variables. Example: `docker run -e STORAGE_PATH=/registry`.\n\nYou may also use different \"flavors\" from that file (see below).\n\nFinally, you can use your own configuration file (see below).\n\n\n# Configuration flavors\n\nThe registry can be instructed to use a specific flavor from a configuration file.\n\nThis mechanism lets you define different running \"mode\" (eg: \"development\", \"production\" or anything else).\n\nIn the `config_sample.yml` file, you'll see several sample flavors:\n\n1. `common`: used by all other flavors as base settings\n1. `local`: stores data on the local filesystem\n1. `s3`: stores data in an AWS S3 bucket\n1. `ceph-s3`: stores data in a Ceph cluster via a Ceph Object Gateway, using the S3 API\n1. `azureblob`: stores data in an Microsoft Azure Blob Storage ([(docs)](ADVANCED.md))\n1. `dev`: basic configuration using the `local` flavor\n1. `test`: used by unit tests\n1. `prod`: production configuration (basically a synonym for the `s3` flavor)\n1. `gcs`: stores data in Google cloud storage\n1. `swift`: stores data in OpenStack Swift\n1. `glance`: stores data in OpenStack Glance, with a fallback to local storage\n1. `glance-swift`: stores data in OpenStack Glance, with a fallback to Swift\n1. `elliptics`: stores data in Elliptics key/value storage\n\nYou can define your own flavors by adding a new top-level yaml key.\n\nTo specify which flavor you want to run, set the `SETTINGS_FLAVOR`\nenvironment variable: `export SETTINGS_FLAVOR=dev`\n\nThe default flavor is `dev`.\n\nNOTE: it's possible to load environment variables from within the config file\nwith a simple syntax: `_env:VARIABLENAME[:DEFAULT]`. Check this syntax\nin action in the example below...\n\n\n## Example config\n\n```yaml\n\ncommon: \u0026common\n    standalone: true\n    loglevel: info\n    search_backend: \"_env:SEARCH_BACKEND:\"\n    sqlalchemy_index_database:\n        \"_env:SQLALCHEMY_INDEX_DATABASE:sqlite:////tmp/docker-registry.db\"\n\nprod:\n    \u003c\u003c: *common\n    loglevel: warn\n    storage: s3\n    s3_access_key: _env:AWS_S3_ACCESS_KEY\n    s3_secret_key: _env:AWS_S3_SECRET_KEY\n    s3_bucket: _env:AWS_S3_BUCKET\n    boto_bucket: _env:AWS_S3_BUCKET\n    storage_path: /srv/docker\n    smtp_host: localhost\n    from_addr: docker@myself.com\n    to_addr: my@myself.com\n\ndev:\n    \u003c\u003c: *common\n    loglevel: debug\n    storage: local\n    storage_path: /home/myself/docker\n\ntest:\n    \u003c\u003c: *common\n    storage: local\n    storage_path: /tmp/tmpdockertmp\n```\n\n\n\n# Available configuration options\n\nWhen using the `config_sample.yml`, you can pass all options through as environment variables. See [`config_sample.yml`](config/config_sample.yml) for the mapping.\n\n## General options\n\n1. `loglevel`: string, level of debugging. Any of python's\n   [logging](http://docs.python.org/2/library/logging.html) module levels:\n   `debug`, `info`, `warn`, `error` or `critical`\n1. `debug`: boolean, make the `/_ping` endpoint output more useful information, such as library versions and host information.\n1. `storage_redirect`: Redirect resource requested if storage engine supports\n   this, e.g. S3 will redirect signed URLs, this can be used to offload the\n   server.\n1. `boto_host`/`boto_port`: If you are using `storage: s3` the\n   [standard boto config file locations](http://docs.pythonboto.org/en/latest/boto_config_tut.html#details)\n   (`/etc/boto.cfg, ~/.boto`) will be used.  If you are using a\n   *non*-Amazon S3-compliant object store (such as Ceph), in one of the boto config files'\n   `[Credentials]` section, set `boto_host`, `boto_port` as appropriate for the\n   service you are using. Alternatively, set `boto_host` and `boto_port` in the config file.\n\n## Authentication options\n\n1. `standalone`: boolean, run the server in stand-alone mode. This means that\n   the Index service on index.docker.io will not be used for anything. This\n   implies `disable_token_auth`.\n\n1. `index_endpoint`: string, configures the hostname of the Index endpoint.\n   This is used to verify passwords of users that log in. It defaults to\n   https://index.docker.io. You should probably leave this to its default.\n\n1. `disable_token_auth`: boolean, disable checking of tokens with the Docker\n   index. You should provide your own method of authentication (such as Basic\n   auth).\n\n## Search-engine options\n\nThe Docker Registry can optionally index repository information in a\ndatabase for the `GET /v1/search` [endpoint][search-endpoint].  You\ncan configure the backend with a configuration like:\n\nThe `search_backend` setting selects the search backend to use.  If\n`search_backend` is empty, no index is built, and the search endpoint always\nreturns empty results.\n\n1. `search_backend`: The name of the search backend engine to use.\n   Currently supported backends are:\n   1. `sqlalchemy`\n\nIf `search_backend` is neither empty nor one of the supported backends, it\nshould point to a module.\n\nExample:\n\n```yaml\ncommon:\n  search_backend: foo.registry.index.xapian\n```\n\nIn this case, the module is imported, and an instance of its `Index`\nclass is used as the search backend.\n\n### sqlalchemy\n\nUse [SQLAlchemy][] as the search backend.\n\n1. `sqlalchemy_index_database`: The database URL passed through to\n   [create_engine][].\n\nExample:\n\n```yaml\ncommon:\n  search_backend: sqlalchemy\n  sqlalchemy_index_database: sqlite:////tmp/docker-registry.db\n```\n\nOn initialization, the `SQLAlchemyIndex` class checks the database\nversion.  If the database doesn't exist yet (or does exist, but lacks\na `version` table), the `SQLAlchemyIndex` creates the database and\nrequired tables.\n\n## Mirroring Options\n\nAll mirror options are placed in a `mirroring` section.\n\n1. `mirroring`:\n  1. `source`:\n  1. `source_index`:\n  1. `tags_cache_ttl`:\n\nExample:\n\n```yaml\ncommon:\n  mirroring:\n    source: https://registry-1.docker.io\n    source_index: https://index.docker.io\n    tags_cache_ttl: 172800 # 2 days\n```\n\nBeware that mirroring only works for the public registry. You can not create a\nmirror for a private registry.\n\n## Cache options\n\nIt's possible to add an LRU cache to access small files. In this case you need\nto spawn a [redis-server](http://redis.io/) configured in\n[LRU mode](http://redis.io/topics/config). The config file \"config_sample.yml\"\nshows an example to enable the LRU cache using the config directive `cache_lru`.\n\nOnce this feature is enabled, all small files (tags, meta-data) will be cached\nin Redis. When using a remote storage backend (like Amazon S3), it will speed\nthings up dramatically since it will reduce roundtrips to S3.\n\nAll config settings are placed in a `cache` or `cache_lru` section.\n\n1. `cache`/`cache_lru`:\n  1. `host`: Host address of server\n  1. `port`: Port server listens on\n  1. `password`: Authentication password\n\n\n\n## Storage options\n\n`storage` selects the storage engine to use. The registry ships with two storage engine by default (`file` and `s3`).\n\nIf you want to find other (community provided) storages: `pip search docker-registry-driver`\n\nTo use and install one of these alternate storages:\n\n * `pip install docker-registry-driver-NAME`\n * in the configuration set `storage` to `NAME`\n * add any other storage dependent configuration option to the conf file\n * review the storage specific documentation for additional dependency or configuration instructions.\n\n Currently, we are aware of the following storage drivers:\n\n  * [azure](https://github.com/ahmetalpbalkan/docker-registry-driver-azure)\n  * [elliptics](https://github.com/noxiouz/docker-registry-driver-elliptics)\n  * [swift](https://github.com/bacongobbler/docker-registry-driver-swift)\n  * [gcs](https://github.com/dmp42/docker-registry-driver-gcs)\n  * [glance](https://github.com/dmp42/docker-registry-driver-glance)\n  * [oss](https://github.com/chris-jin/docker-registry-driver-alioss.git)\n\n### storage file\n\n1. `storage_path`: Path on the filesystem where to store data\n\nExample:\n\n```yaml\nlocal:\n  storage: file\n  storage_path: /mnt/registry\n```\n\n#### Persistent storage\nIf you use any type of local store along with a registry running within a docker\nremember to use a data volume for the `storage_path`. Please read the documentation\nfor [data volumes](http://docs.docker.io/en/latest/use/working_with_volumes/) for more information.\n\nExample:\n\n```\ndocker run -p 5000 -v /tmp/registry:/tmp/registry registry\n```\n\n### storage s3\nAWS Simple Storage Service options\n\n1. `s3_access_key`: string, S3 access key\n1. `s3_secret_key`: string, S3 secret key\n1. `s3_bucket`: string, S3 bucket name\n1. `s3_region`: S3 region where the bucket is located\n1. `s3_encrypt`: boolean, if true, the container will be encrypted on the\n      server-side by S3 and will be stored in an encrypted form while at rest\n      in S3.\n1. `s3_secure`: boolean, true for HTTPS to S3\n1. `s3_use_sigv4`: boolean, true for USE_SIGV4 (boto_host needs to be set or use_sigv4 will be ignored by boto.)\n1. `boto_bucket`: string, the bucket name for *non*-Amazon S3-compliant object store\n1. `boto_host`: string, host for *non*-Amazon S3-compliant object store\n1. `boto_port`: for *non*-Amazon S3-compliant object store\n1. `boto_debug`: for *non*-Amazon S3-compliant object store\n1. `boto_calling_format`: string, the fully qualified class name of the boto calling format to use when accessing S3 or a *non*-Amazon S3-compliant object store\n1. `storage_path`: string, the sub \"folder\" where image data will be stored.\n\nExample:\n```yaml\nprod:\n  storage: s3\n  s3_region: us-west-1\n  s3_bucket: acme-docker\n  storage_path: /registry\n  s3_access_key: AKIAHSHB43HS3J92MXZ\n  s3_secret_key: xdDowwlK7TJajV1Y7EoOZrmuPEJlHYcNP2k4j49T\n```\n\n# Your own config\n\nStart from a copy of [config_sample.yml](config/config_sample.yml).\n\nThen, start your registry with a mount point to expose your new configuration inside the container (`-v /home/me/myfolder:/registry-conf`), and point to it using the `DOCKER_REGISTRY_CONFIG` environment variable:\n\n```\nsudo docker run -p 5000:5000 -v /home/me/myfolder:/registry-conf -e DOCKER_REGISTRY_CONFIG=/registry-conf/mysuperconfig.yml registry\n```\n\n# Advanced use\n\nFor more features and advanced options, have a look at the [advanced features documentation](ADVANCED.md)\n\n# Drivers\n\nFor more backend drivers, please read [drivers.md](DRIVERS.md)\n\n# For developers\n\nRead [contributing](CONTRIBUTING.md)\n\n[search-endpoint]: http://docs.docker.com/reference/api/docker-io_api/#search\n[SQLAlchemy]: http://docs.sqlalchemy.org/\n[create_engine]: http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker-archive%2Fdocker-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocker-archive%2Fdocker-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker-archive%2Fdocker-registry/lists"}