This is a docker-registry backend driver based on the gcs key-value storage.
Assuming you have a working docker-registry and gcs setup.
pip install docker-registry-driver-gcs
Edit your configuration so that storage
reads gcs
.
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
.
boto_bucket
: string, the bucket namestorage_path
: string, the sub "folder" where image data will be stored.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:
gs_access_key
: string, GCS access keygs_secret_key
: string, GCS secret keygs_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
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
This is licensed under the Apache license. Most of the code here comes from docker-registry, under an Apache license as well.