/docker-registry-driver-gcs

Docker registry driver using gcs

Primary LanguagePythonApache License 2.0Apache-2.0

Docker registry gcs driver

This is a docker-registry backend driver based on the gcs key-value storage.

PyPI version Build Status

Usage

Assuming you have a working docker-registry and gcs setup.

pip install docker-registry-driver-gcs

Edit your configuration so that storage reads gcs.

Options

You may add any of the following to your main docker-registry configuration to further configure it.

These options configure your Google Cloud Storage storage. These are used when storage is set to gcs.

  1. boto_bucket: string, the bucket name
  2. storage_path: string, the sub "folder" where image data will be stored.
  3. oauth2: boolean, true to enable OAuth2.0

Example:

dev:
  boto_bucket: "_env:GCS_BUCKET"
  storage: gcs
  storage_path: "_env:STORAGE_PATH:/"
  oauth2: true

You can also use developer keys for (if oauth2 is unset or set to false) instead of using OAuth2.0. Options to configure then:

  1. gs_access_key: string, GCS access key
  2. gs_secret_key: string, GCS secret key
  3. gs_secure: boolean, true for HTTPS to GCS

Example:

dev:
  boto_bucket: "_env:GCS_BUCKET"
  storage: gcs
  storage_path: "_env:STORAGE_PATH:/"
  gs_access_key: GOOGTS7C7FUP3AIRVJTE
  gs_secret_key: bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ
  gs_secure: false

Developer setup

Clone this.

Get your python ready:

sudo apt-get install python-pip
sudo pip install tox

Start the test gcs:

cd fixtures
sudo ./start.sh

You are ready to hack. In order to verify what you did is ok:

  • run tox
  • alternatively, run python setup.py nosetests to only run tests on the system python

This will run the tests provided by docker-registry-core

License

This is licensed under the Apache license. Most of the code here comes from docker-registry, under an Apache license as well.