<commit_before># conjur-registry-proxy
Use conjur-asset-proxy to access a Conjur-protected Docker registry.

# Build

```
$ docker build -t conjur-registry-proxy .
```

# Run
You must first use `conjur init` and `conjur authn login` to connect to and authenticate with the Conjur server protecting the registry. Then, grab the path to the cert from `~/.conjurrc`, and start the proxy container in the background

```
$ cert_file=$(grep cert_file ~/.conjurrc | awk '{print $2}' | tr -d '"')
$ docker run -d -p 80:80 \
  -v ~/.netrc:/root/.netrc \
  -v ~/.conjurrc:/root/.conjurrc \
  -v $cert_file:/root/conjur.pem \
  -e CONJUR_CERT_FILE=/root/conjur.pem \
  --name conjur-registry-proxy conjur-registry-proxy
```

To see the logs:

```
$ docker logs conjur-registry-proxy
```

# Use

Run as above, the proxy listens on port 80 for requests to forward. If you reference your Docker registry by name (e.g. `registry.tld`), you'll need to add an entry to `/etc/hosts`:

```
127.0.0.1	registry.tld
```

Then, you can access your registry through the proxy
<commit_msg>updated the readme to reflect the simplified run file<commit_after># conjur-registry-proxy
Use conjur-asset-proxy to access a Conjur-protected Docker registry.

# Run
You must first use `conjur init` to connect to the Conjur server protecting the registry.

```
$ ./run.sh
```

# Use

Run as above, the proxy listens on port 80 for requests to forward. If you reference your Docker registry by name (e.g. `registry.tld`), you'll need to add an entry to `/etc/hosts`:

```
127.0.0.1	registry.tld
```

Then, you can access your registry through the proxy

{'fraction_non_alphanumeric': 0.11866501854140915, 'fraction_numerical': 0.012978986402966625, 'mean_word_length': 3.679190751445087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6374629', 'n_tokens_mistral': 576, 'n_tokens_neox': 520, 'n_words': 207}