Minor documentation tweaks

This commit is contained in:
R Tyler Croy 2020-09-12 10:34:46 -07:00
parent 7e883d84f4
commit 153509c935
2 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,8 @@
= Contaminate
Contaminate is a caching proxy masquerading as Docker registry. It can modify
Docker images and manifests on the fly, for those who need a little more mutability in their immutable infrastructure.
Docker images and manifests on the fly, for those who need a little more
mutability in their immutable infrastructure.
== Configuration
@ -14,14 +15,17 @@ environment variables which can override configuration values.
[cols="^1,<.^4,^1,^1"]
|===
.^| Name
.^| Env Variable
.^| Default Value
.^| Notes
| `layers_dir`
| `CT_layers_dir`
| `./layers.d`
| A directory containing the layers to override on images passing through Contaminate.
| `registry`
| `CT_registry`
| https://registry-1.docker.io
| A Registry HTTP V2 compliant URL, reachable by Contaminate.
@ -40,13 +44,9 @@ environment variables which can override configuration values.
| `warn`
| Log level for Contaminate logs to be printed
| `CT_layers_dir`
| `./layers.d`
| A directory containing the layers to override on images passing through Contaminate.
| `CT_registry`
| https://registry-1.docker.io
| A Registry HTTP V2 compliant URL, reachable by Contaminate.
| `RUST_BACKTRACE`
| `0`
| Print full stack traces when errors occur
|===
@ -67,3 +67,12 @@ Running a local Docker registry to contaminate:
----
docker run --rm -ti -e REGISTRY_HTTP_SECRET=secret -p 5000:5000 registry:2
----
Pull some upstream images and push them into your registry
[source,sh]
----
docker pull alpine:latest
docker tag alpine:latest localhost:5000/library/alpine:latest
docker push localhost:5000/library/alpine:latest
----

View File

@ -174,6 +174,7 @@ async fn fetch_digest(req: Request<AppState>) -> Result<Response, tide::Error> {
let accepts = header_as_str(&req, "Accept", "");
if let Ok(mut up_req) = make_get_request(&full_url, &token, &accepts).await {
// TODO: Safely handle this error on deserialization
let manifest: models::Manifest = up_req.body_json().await.expect("Failed to parse response");
debug!("Manifest: {:?}", manifest);
Ok(Response::new(200))