Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 237b0b1

Browse files
committed
Run standalone
Signed-off-by: Christian Dupuis <[email protected]>
1 parent 662a990 commit 237b0b1

File tree

7 files changed

+254
-200
lines changed

7 files changed

+254
-200
lines changed

Diff for: .goreleaser.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
project_name: docker-index
2+
13
release:
24
prerelease: auto
35
draft: true

Diff for: README.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,32 @@ using the Atomist data plane.
77

88
## Installation
99

10-
To install, run the following command in your terminal:
10+
You can install manually by following these steps:
1111

12-
```shell
13-
$ curl -sSfL https://raw.githubusercontent.com/docker/index-cli-plugin/main/install.sh | sh -s --
14-
```
15-
16-
Alternatively, you can install manually by following these steps:
17-
18-
* Download the plugin binary from the [release page](https://github.com/docker/index-cli-plugin/releases/latest)
12+
* Download the binary from the [release page](https://github.com/docker/index-cli-plugin/releases/latest)
1913
* Unzip the archive
20-
* Copy/move the binary into `$HOME/.docker/cli-plugins`
2114

2215
## Usage
2316

24-
### `docker index sbom`
17+
### `docker-index sbom`
2518

2619
To create an SBOM for a local or remote image, run the following command:
2720

2821
```shell
29-
$ docker index sbom --image <IMAGE>
22+
$ docker-index sbom --image <IMAGE>
3023
```
3124

3225
* `--image <IMAGE>` can either be a local image id or fully qualified image name from a remote registry
3326
* `--oci-dir <DIR>` can point to a local image in OCI directory format
3427
* `--output <OUTPUT FILE>` allows to store the generated SBOM in a local file
3528
* `--include-cves` will include all detected CVEs in generated output
3629

37-
### `docker index cve`
30+
### `docker-index cve`
3831

3932
To detect base images for local or remote images, use the following command:
4033

4134
```shell
42-
$ docker index cve --image <IMAGE> CVE_ID
35+
$ docker-index cve --image <IMAGE> CVE_ID
4336
```
4437

4538
* `--image <IMAGE>` can either be a local image id or fully qualified image name from a remote registry

Diff for: Taskfile.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ vars:
66
tasks:
77
go:build:
88
cmds:
9-
- go build -ldflags="-w -s -X 'github.com/docker/index-cli-plugin/internal.version={{.GIT_COMMIT}}'"
9+
- go build -o docker-index -ldflags="-w -s -X 'github.com/docker/index-cli-plugin/internal.version={{.GIT_COMMIT}}'"
1010
env:
1111
CGO_ENABLED: 0
1212
vars:
@@ -17,7 +17,7 @@ tasks:
1717
deps: [go:build]
1818
cmds:
1919
- mkdir -p ~/.docker/cli-plugins
20-
- install index-cli-plugin ~/.docker/cli-plugins/docker-index
20+
- install docker-index ~/.docker/cli-plugins/docker-index
2121

2222
go:fmt:
2323
cmds:
@@ -29,6 +29,10 @@ tasks:
2929
cmds:
3030
- goreleaser release --rm-dist
3131

32+
go:snapshot:
33+
cmds:
34+
- goreleaser release --snapshot --rm-dist
35+
3236
docker:build:
3337
cmds:
3438
- docker buildx build . -f Dockerfile -t {{.IMAGE_NAME}} --load

Diff for: go.mod

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ require (
88
github.com/anchore/syft v0.59.0
99
github.com/aquasecurity/trivy v0.30.4
1010
github.com/atomist-skills/go-skill v0.0.6-0.20221003172518-c3d268e1f3f1
11-
github.com/docker/cli v20.10.17+incompatible
11+
github.com/docker/cli v20.10.21+incompatible
12+
github.com/docker/docker v20.10.17+incompatible
1213
github.com/google/go-containerregistry v0.11.0
1314
github.com/google/uuid v1.3.0
1415
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae
@@ -63,7 +64,6 @@ require (
6364
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
6465
github.com/dimchansky/utfbom v1.1.1 // indirect
6566
github.com/docker/distribution v2.8.1+incompatible // indirect
66-
github.com/docker/docker v20.10.17+incompatible // indirect
6767
github.com/docker/docker-credential-helpers v0.6.4 // indirect
6868
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
6969
github.com/docker/go-connections v0.4.0 // indirect
@@ -205,3 +205,8 @@ require (
205205
modernc.org/strutil v1.1.1 // indirect
206206
modernc.org/token v1.0.0 // indirect
207207
)
208+
209+
replace (
210+
github.com/docker/cli => github.com/docker/cli v20.10.3-0.20220803220330-418ca3b4d46f+incompatible // master (v22.06-dev)
211+
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible // 22.06 branch (v22.06-dev)
212+
)

Diff for: go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -507,17 +507,23 @@ github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi
507507
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
508508
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
509509
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
510+
github.com/docker/cli v20.10.3-0.20220803220330-418ca3b4d46f+incompatible h1:iKanFYBu6Cum7d9j8JGTw2s/d7hUAcXRkEcp2m8b6Qc=
511+
github.com/docker/cli v20.10.3-0.20220803220330-418ca3b4d46f+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
510512
github.com/docker/cli v20.10.10+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
511513
github.com/docker/cli v20.10.12+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
512514
github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M=
513515
github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
516+
github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU=
517+
github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
514518
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
515519
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
516520
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
517521
github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
518522
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
519523
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
520524
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
525+
github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible h1:gaceOC7utpmWqA7OF95kxXO2lGNTkbHIvgxpE+0hPi8=
526+
github.com/docker/docker v20.10.3-0.20220720171342-a60b458179aa+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
521527
github.com/docker/docker v20.10.10+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
522528
github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
523529
github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE=

Diff for: install.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
set -u
2020

21-
PROJECT_NAME="index-cli-plugin"
21+
PROJECT_NAME="docker-index"
2222
OWNER=docker
23-
REPO="${PROJECT_NAME}"
23+
REPO="index-cli-plugin"
2424
GITHUB_DOWNLOAD_PREFIX=https://github.com/${OWNER}/${REPO}/releases/download
25-
INSTALL_SH_BASE_URL=https://raw.githubusercontent.com/${OWNER}/${PROJECT_NAME}
25+
INSTALL_SH_BASE_URL=https://raw.githubusercontent.com/${OWNER}/${REPO}
2626
BINARY="docker-index"
2727
DOCKER_HOME=${DOCKER_HOME:-~/.docker}
2828
DEFAULT_INSTALL_DIR=${DOCKER_HOME}/cli-plugins

0 commit comments

Comments
 (0)