Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Add usage examples to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos.Cela committed Feb 1, 2019
1 parent b28b37e commit 32672b0
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,86 @@ the [configuration documentation], and it is greatly recommended to use the auto

You can enable shell autocomplete scripts (in fact, it is highly recommended!), read how here: [autocomplete].


## Usage

Once you have correctly downloaded and configured dr, you can start using it:

### Lis existing images:

```bash
$dr ls
{
"images": [
{
"name": "alpine"
},
{
"name": "another/busy/subpath"
},
{
"name": "busybox"
},
{
"name": "busybox/another/subpath/testing"
},
{
"name": "busybox/testing"
},
{
"name": "busybox/testing"
}
]
}
```

Listing tags for a specific image:
```bash
dr tags busybox/testing
{
"tags": [
"latest",
"mytag"
]
}

```

Or getting information about a specific image and tag:
```bash
dr manifest busybox:1.29
{
"compressedSize": "729.5 kB",
"digest": "sha256:758ec7f3a1ee85f8f08399b55641bfb13e8c1109287ddc5e22b68c3d653152ee",
"image": "busybox",
"layers": 1,
"repository": "localhost:5000",
"tag": "1.29"
}
```

You can also play with the flags to use different output formats:

```bash
dr manifest busybox:1.29 --output plain
repository: localhost:5000
image: busybox
name: "1.29"
digest: sha256:758ec7f3a1ee85f8f08399b55641bfb13e8c1109287ddc5e22b68c3d653152ee
layers: 1
compressedSize: 729.5 kB
```
```bash
dr ls --output yaml
images:
- name: alpine
- name: another/busy/subpath
- name: busybox
- name: busybox/another/subpath/testing
- name: busybox/testing
- name: busybox/testing
```

## Disclaimer

This is a personal project aimed at learning Golang, but perhaps it will
Expand Down

0 comments on commit 32672b0

Please sign in to comment.