-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |