@@ -17,18 +17,15 @@ The stable, released version is currently the [0.6.9 tag](https://github.com/dot
17
17
Quick start
18
18
===========
19
19
20
- The fastest way to get running is using the
21
- [ official image from the Docker index] ( https://index.docker.io/_/registry/ ) :
20
+ The fastest way to get running:
22
21
23
- This example will launch a container on port 5000, and storing images within
24
- the container itself:
25
- ```
26
- docker run -p 5000:5000 registry
27
- ```
22
+ * install docker according to the [ following instructions] ( http://docs.docker.io/installation/#installation )
23
+ * run the registry: ` docker run -p 5000:5000 registry `
28
24
25
+ That will use the
26
+ [ official image from the Docker index] ( https://index.docker.io/_/registry/ ) .
29
27
30
- This example will launch a container on port 5000, and storing images in an
31
- Amazon S3 bucket:
28
+ Here is another example that will launch a container on port 5000, and store images in an Amazon S3 bucket:
32
29
```
33
30
docker run \
34
31
-e SETTINGS_FLAVOR=s3 \
@@ -65,14 +62,14 @@ In the `config_sample.yml` file, you'll see several sample flavors:
65
62
1 . ` common ` : used by all other flavors as base settings
66
63
1 . ` local ` : stores data on the local filesystem
67
64
1 . ` s3 ` : stores data in an AWS S3 bucket
65
+ 1 . ` dev ` : basic configuration using the ` local ` flavor
66
+ 1 . ` test ` : used by unit tests
67
+ 1 . ` prod ` : production configuration (basically a synonym for the ` s3 ` flavor)
68
68
1 . ` gcs ` : stores data in Google cloud storage
69
69
1 . ` swift ` : stores data in OpenStack Swift
70
70
1 . ` glance ` : stores data in OpenStack Glance, with a fallback to local storage
71
71
1 . ` glance-swift ` : stores data in OpenStack Glance, with a fallback to Swift
72
72
1 . ` elliptics ` : stores data in Elliptics key/value storage
73
- 1 . ` dev ` : basic configuration using the ` local ` flavor
74
- 1 . ` test ` : used by unit tests
75
- 1 . ` prod ` : production configuration (basically a synonym for the ` s3 ` flavor)
76
73
77
74
You can define your own flavors by adding a new top-level yaml key.
78
75
@@ -300,18 +297,33 @@ test:
300
297
301
298
# # Storage options
302
299
303
- 1. `storage` : Selects the storage engine to use. The options for which are
304
- defined below
300
+ ` storage` selects the storage engine to use. The registry ships with two storage engine by default (`file` and `s3`).
301
+
302
+ If you want to find other (community provided) storages : ` pip search docker-registry-driver`
303
+
304
+ To use and install one of these alternate storages :
305
+
306
+ * `pip install docker-registry-driver-NAME`
307
+ * in the configuration set `storage` to `NAME`
308
+ * add any other storage dependent configuraiton option to the conf file
309
+ * review the storage specific documentation for additional dependency or configuration instructions.
305
310
306
- # ## storage: local
311
+ Currently, we are aware of the following storage driver :
312
+
313
+ * [elliptics](https://github.com/noxiouz/docker-registry-driver-elliptics)
314
+ * [swift](https://github.com/bacongobbler/docker-registry-driver-swift)
315
+ * [gcs](https://github.com/dmp42/docker-registry-driver-gcs)
316
+ * [glance](https://github.com/dmp42/docker-registry-driver-glance)
317
+
318
+ # ## storage: file
307
319
308
320
1. `storage_path` : Path on the filesystem where to store data
309
321
310
322
Example :
311
323
312
324
` ` ` yaml
313
325
local:
314
- storage: local
326
+ storage: file
315
327
storage_path: /mnt/registry
316
328
` ` `
317
329
@@ -351,104 +363,13 @@ prod:
351
363
s3_secret_key: xdDowwlK7TJajV1Y7EoOZrmuPEJlHYcNP2k4j49T
352
364
` ` `
353
365
354
- # ## storage: elliptics
355
- [Elliptics](http://reverbrain.com/elliptics/) key/value storage options
356
-
357
- 1. `elliptics_nodes` : Elliptics remotes
358
- Can be a hash of `address : port`, or a list of `address:port` strings, or a single space delimited string.
359
- 1. `elliptics_wait_timeout` : time to wait for the operation complete
360
- 1. `elliptics_check_timeout` : timeout for pinging node
361
- 1. `elliptics_io_thread_num` : number of IO threads in processing pool
362
- 1. `elliptics_net_thread_num` : number of threads in network processing pool
363
- 1. `elliptics_nonblocking_io_thread_num` : number of IO threads in processing pool dedicated to nonblocking ops
364
- 1. `elliptics_groups` : Elliptics groups registry should use
365
- 1. `elliptics_verbosity` : Elliptics logger verbosity (0...4)
366
- 1. `elliptics_logfile` : path to Elliptics logfile (default: `dev/stderr`)
367
- 1. `elliptics_addr_family` : address family to use when adding Elliptics remotes (default: `2` (for ipv4)). Use 10 for ipv6 remotes on Linux.
368
-
369
- Example :
370
- ` ` ` yaml
371
- dev:
372
- storage: elliptics
373
- elliptics_nodes:
374
- elliptics-host1: 1025
375
- elliptics-host2: 1025
376
- elliptics_wait_timeout: 60
377
- elliptics_check_timeout: 60
378
- elliptics_io_thread_num: 2
379
- elliptics_net_thread_num: 2
380
- elliptics_nonblocking_io_thread_num: 2
381
- elliptics_groups: [1, 2, 3]
382
- elliptics_verbosity: 4
383
- elliptics_logfile: "/tmp/logfile.log"
384
- elliptics_loglevel: debug
385
- ` ` `
386
-
387
- # ## storage: gcs
388
- [Google Cloud Storage](https://cloud.google.com/products/cloud-storage/) options
389
-
390
- 1. `boto_bucket` : string, the bucket name
391
- 1. `storage_path` : string, the sub "folder" where image data will be stored.
392
- 1. `oauth2` : boolean, true to enable [OAuth2.0](https://developers.google.com/accounts/docs/OAuth2)
393
-
394
- Example :
395
- ` ` ` yaml
396
- dev:
397
- boto_bucket: "_env:GCS_BUCKET"
398
- storage: gcs
399
- storage_path: "_env:STORAGE_PATH:/"
400
- oauth2: true
401
- ` ` `
402
-
403
- You can also use [developer keys](https://developers.google.com/storage/docs/reference/v1/getting-startedv1#keys) for (if `oauth2` is unset or set to false) instead
404
- of using [OAuth2.0](https://developers.google.com/accounts/docs/OAuth2). Options to configure then :
405
-
406
- 1. `gs_access_key` : string, GCS access key
407
- 1. `gs_secret_key` : string, GCS secret key
408
- 1. `gs_secure` : boolean, true for HTTPS to GCS
409
-
410
- Example :
411
- ` ` ` yaml
412
- dev:
413
- boto_bucket: "_env:GCS_BUCKET"
414
- storage: gcs
415
- storage_path: "_env:STORAGE_PATH:/"
416
- gs_access_key: GOOGTS7C7FUP3AIRVJTE
417
- gs_secret_key: bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ
418
- gs_secure: false
419
- ` ` `
420
-
421
- # ## storage: swift
422
- OpenStack Swift options
423
-
424
- 1. `storage_path` : The prefix of where data will be stored
425
- 1. `swift_authurl` : Authentication url
426
- 1. `swift_container` :
427
- 1. `swift_user` :
428
- 1. `swift_password` :
429
- 1. `swift_tenant_name` :
430
- 1. `swift_region_name` :
431
-
432
- # ## storage: glance
433
- OpenStack Glance options
434
-
435
- 1. `storage_alternate` :
436
- 1. `storage_path` :
437
-
438
-
439
366
Run the Registry
440
367
----------------
441
368
442
- # ## Option 1 (Recommended) - Run the registry docker container
443
-
444
- Install docker according to the following instructions :
445
- http://docs.docker.io/installation/#installation
369
+ # ## Recommended: run the registry docker container
446
370
447
- Run registry :
448
-
449
- ` ` `
450
- docker run -p 5000:5000 registry
451
- ` ` `
371
+ * install docker according to the [following instructions](http://docs.docker.io/installation/#installation)
372
+ * run the registry: `docker run -p 5000:5000 registry`
452
373
453
374
or
454
375
@@ -467,27 +388,29 @@ docker run \
467
388
NOTE: The container will try to allocate the port 5000. If the port
468
389
is already taken, find out which container is already using it by running `docker ps`
469
390
470
- ### Option 2 ( Advanced) - Install the registry on an existing server
391
+ ### Advanced: install the registry on an existing server
471
392
472
393
#### On Ubuntu
473
394
474
395
Install the system requirements for building a Python library:
475
396
476
397
```
477
- sudo apt-get install build-essential python-dev libevent-dev python-pip libssl-dev liblzma-dev libffi -dev
398
+ sudo apt-get install build-essential python-dev libevent-dev python-pip liblzma-dev
478
399
```
479
400
480
401
Then install the Registry app:
481
402
482
403
```
483
- sudo pip install .
404
+ sudo pip install docker-registry
484
405
```
485
406
407
+ (or clone the repository and `pip install .`)
408
+
486
409
#### On Red Hat-based systems:
487
410
488
411
Install the required dependencies:
489
412
```
490
- sudo yum install python-devel libevent-devel python-pip openssl-devel libffi-devel gcc xz-devel
413
+ sudo yum install python-devel libevent-devel python-pip gcc xz-devel
491
414
```
492
415
493
416
NOTE: On RHEL and CentOS you will need the
@@ -497,9 +420,11 @@ should not require the additional repositories.
497
420
Then install the Registry app:
498
421
499
422
```
500
- sudo python-pip install .
423
+ sudo python-pip install docker-registry
501
424
```
502
425
426
+ (or clone the repository and `pip install .`)
427
+
503
428
#### Run it
504
429
505
430
```
@@ -557,27 +482,7 @@ dotcloud create myregistry
557
482
dotcloud push
558
483
```
559
484
560
- Run tests
561
- ---------
562
- Make sure you have git installed. If not:
563
-
564
- Fedora/RHEL/CentOS :
565
-
566
- ```
567
- sudo yum install git
568
- ```
569
-
570
- If you want to submit a pull request, please run the unit tests using tox
571
- before submitting anything to the repos:
572
-
573
- ```
574
- pip install tox
575
- cd docker-registry/
576
- tox
577
- ```
485
+ For developers
486
+ --------------
578
487
579
- [search-endpoint]:
580
- http://docs.docker.io/en/latest/reference/api/index_api/#get--v1-search
581
- [SQLAlchemy]: http://docs.sqlalchemy.org/
582
- [create_engine]:
583
- http://docs.sqlalchemy.org/en/latest/core/engines.html#sqlalchemy.create_engine
488
+ Read CONTRIBUTE.md
0 commit comments