<commit_before>Docker Registry Downloader
==========================

Syncronize images from Docker Registry with your local Docker images.
Works just like `docker pull` but better because is faster.

### install
```shell
npm i docker-registry-downloader --save
```

### developer

```shell
# run all tests (slow)
gulp test

# filter tests
gulp test --grep='should sync azukiapp/azktcl:0.0.2'

# enable "request" debug
NODE_DEBUG=request gulp test

# enable "REGISTRY" debug
DOCKER_REGISTRY_DEBUG_LEVEL=debug gulp test

# send authentication
DOCKER_USER=my_docker_user DOCKER_PASS=my_docker_escapade_password gulp test
```

<commit_msg>Updating README.md<commit_after>Docker Registry Downloader
==========================

Syncronize images from Docker Registry with your local Docker images.
Works just like `docker pull` but better because is faster.

### Quick-start sample app
```shell
# clone this repo
git clone <EMAIL>:azukiapp/docker-registry-downloader.git

# go to the "sync promises example" folder
cd "docker-registry-downloader/examples/sync promises"

# npm install
npm i

# remove azukiapp/azktcl:0.0.2 if exist
docker rmi -f azukiapp/azktcl:0.0.2

# run example
node start.js
```

### install
```shell
npm i docker-registry-downloader --save
```

### usage
```javascript
var DockerHub   = require('docker-registry-downloader').DockerHub;
var Syncronizer = require('docker-registry-downloader').Syncronizer;
var dockerHub   = new DockerHub();
var syncronizer = new Syncronizer();

var namespace   = 'azukiapp';
var repository  = 'azktcl';
var tag         = '0.0.2';
var outputPath  = __dirname + '/output'; // this folder must exist

// get token from DOCKER HUB API
dockerHub.images(namespace, repository).then(function(hubResult) {

  // sync registry layer with local layers
  return syncronizer.sync(hubResult, tag, outputPath);
});
```


### developer

```shell
# run all tests (slow)
gulp test

# filter tests
gulp test --grep='should sync azukiapp/azktcl:0.0.2'

# enable "request" debug
NODE_DEBUG=request gulp test

# enable "REGISTRY" debug
DOCKER_REGISTRY_DEBUG_LEVEL=debug gulp test

# send authentication
DOCKER_USER=my_docker_user DOCKER_PASS=<PASSWORD> gulp test
```


{'fraction_non_alphanumeric': 0.12738853503184713, 'fraction_numerical': 0.006824385805277525, 'mean_word_length': 5.074585635359116, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4451405', 'n_tokens_mistral': 746, 'n_tokens_neox': 694, 'n_words': 212}