All Products
Document Center

Docker private image database

Last Updated: Sep 18, 2017

Docker private image database and docker-registry

Image management is the core of Docker. To enable image sharing in an enterprise or organization, Docker officially sets up the open source project docker-registry on GitHub to provide private image databases for Docker. To ensure the reliability, availability, and security of image data, docker-registry can store image data in cloud storage, such as Alibaba Cloud Object Storage Service (OSS).

Quick start of docker-registry supporting Alibaba Cloud OSS

Download and install docker-registry.

  1. Use pip to install the OSS driver:

    pip install docker-registry-driver-alioss

  2. Run docker-registry:

    docker run -e OSS_BUCKET=-e STORAGE_PATH=/docker/ -e OSS_KEY=-e OSS_SECRET=-p 5000:5000 -d chrisjin/registry:ali_oss

  3. Configure config.yml:

    1. local: &local
    2. <<: *common
    3. storage: alioss
    4. storage_path: _env:STORAGE_PATH:/devregistry/
    5. oss_bucket: _env:OSS_BUCKET[:default_value]
    6. oss_accessid: _env:OSS_KEY[:your_access_id]
    7. oss_accesskey: _env:OSS_SECRET[:your_access_key]
  4. Start docker-registry:

    DOCKER_REGISTRY_CONFIG=[your_config_path] gunicorn -k gevent -b -w 1 docker_registry.wi:application