Skip to content

Commit

Permalink
Fix README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mqasimsarfraz committed Sep 3, 2019
1 parent 4e3b6b8 commit c901e8c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ The proxy is packaged in a docker container and can be configured with following
| Environment Variable | Description | Status | Default |
| :---------------------------------: | :--------------------------------------------: | :-------------------------------: | :--------: |
| `AWS_REGION` | AWS Region for AWS ECR | Required | |
| `AWS_ACCESS_KEY_ID` | AWS Account Access ID | Required | |
| `AWS_SECRET_ACCESS_KEY` | AWS Account Secret Key | Required | |
| `RESOLVER` | DNS server to used by proxy | Required | |
| `AWS_ACCESS_KEY_ID` | AWS Account Access Key ID | Required | |
| `AWS_SECRET_ACCESS_KEY` | AWS Account Secret Access Key | Required | |
| `UPSTREAM` | URL for AWS ECR | Required | |
| `RESOLVER` | DNS server to be used by proxy | Required | |
| `PORT` | Port on which proxy listens | Required | |
| `CACHE_MAX_SIZE` | Maximum size for cache volume | Optional | `75g` |
| `CACHE_KEY` | Key to be used for images content/blobs | Optional | `$uri` |
| `CACHE_KEY` | Cache key used for the content by nginx | Optional | `$uri` |
| `ENABLE_SSL` | Used to enable SSL/TLS for proxy | Optional | `false` |
| `REGISTRY_HTTP_TLS_KEY` | Path to TLS key in the container | Required with TLS | |
| `REGISTRY_HTTP_TLS_CERTIFICATE` | Path to TLS cert in the container | Required with TLS | |
Expand Down Expand Up @@ -51,13 +52,13 @@ docker run --rm --name docker-registry-proxy --net=host \
If you ran this command on "registry-proxy.example.com" you can now get your images using `docker pull registry-proxy.example.com:5000/repo/image`.

### Deploying the proxy
Modify the ansible role variables according to your need and run the playbook as follow:
Modify the ansible role [variables](https://github.com/eSailors/aws-ecr-http-proxy/tree/master/roles/docker-registry-proxy/defaults) according to your need and run the playbook as follow:
```sh
ansible-playbook -i hosts playbook-docker-registry-proxy.yaml
```
In case you want to enable SSL/TLS please replace the SSL certificates with the valid ones in `roles/docker-registry-proxy/files/*.pem`
In case you want to enable SSL/TLS please replace the SSL certificates with the valid ones in [roles/docker-registry-proxy/files/*.pem](https://github.com/eSailors/aws-ecr-http-proxy/tree/master/roles/docker-registry-proxy/files)

### Note on SSL/TLS
The proxy is using `HTTP` (plain text) as default protocol for now. So in order to avoid docker client complaining either:
- (**Recommended**) Enable SSL/TLS using `ENABLE_SSL` configuration. For that you will have to mount your **valid** certificate/key in the container and pass the paths using `REGISTRY_HTTP_TLS_*` variables.
- Mark the registry host as insecure in your [deamon config](https://docs.docker.com/registry/insecure/).
- Mark the registry host as insecure in your client [deamon config](https://docs.docker.com/registry/insecure/).

0 comments on commit c901e8c

Please sign in to comment.