Skip to content

Commit

Permalink
Update docs (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthalman authored Jan 10, 2021
1 parent 2179ab8 commit dfc13e7
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing

Contributions are welcome. Submit a pull request or open an issue as necessary.

## Developer Prerequisites

* [Docker](https://docs.docker.com/get-docker/)
* [.NET 5.0 SDK](https://docs.microsoft.com/dotnet/core/install/)
73 changes: 71 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,71 @@
# dredge
Dredge: A Docker Registry Client CLI
# Dredge: A Docker Registry Client CLI

Dredge is a CLI built on .NET that provides a simple way to execute commands on a Docker registry's HTTP API. Currently, only read operations are supported.

## Install

Dredge is published as a [.NET tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools) and available as a [NuGet package](https://www.nuget.org/packages/Valleysoft.Dredge).

### Installing as a global tool

```console
> dotnet tool install -g Valleysoft.Dredge
```

## Usage

### Notes

> * Dredge relies on your credentials already being stored in your environment when targeting registries that require authentication. For those registries you need to run `docker login` (for Docker Hub) or `docker login <registry>` before running Dredge.
> * Dredge targets the Docker Hub registry by default but can be configured to target other registries by using the `-r` or `--registry` option.
### Query Repositories

```console
> dredge repo list -r contoso.azurecr.io
[
"myrepo/app"
"myrepo/app2"
]
```

### Query Tags

```console
> dredge tag list myrepo/app -r contoso.azurecr.io
[
"1.0",
"1.1"
]
```

### Query Manifest

```console
> dredge manifest get myrepo/app 1.0 -r contoso.azurecr.io
{
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 1508,
"digest": "sha256:a5f12aa2470df1d32034c6707c8041158b652f38d2a9ae3d7ad7e7532d22ebe0",
"urls": []
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 2796860,
"digest": "sha256:927c0c94c7c576fff0792aca7ec73d67a2f7f4cb3a6e53a84559337260b36964",
"urls": []
}
],
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2
}
```

### Query Digest

```console
> dredge manifest digest myrepo/app 1.0 -r contoso.azurecr.io
sha256:95202993700f8cd7aba8496c2d0e57be0666e80b4c441925fc6f9361fa81d10e
```

0 comments on commit dfc13e7

Please sign in to comment.