Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit e6b4d5d

Browse files
authored
Merge pull request #157 from docker/readme_install_linux
Docker scan is now packaged with Docker Linux, no need for manual install by default
2 parents 35651ca + ea1ff9c commit e6b4d5d

1 file changed

Lines changed: 36 additions & 19 deletions

File tree

README.md

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,32 @@ Docker Scan is a Command Line Interface to run vulnerability detection on your D
2020

2121
### Login and Third Party Providers
2222

23-
You need to be logged into the Docker Hub in order to use the `docker scan` command.
24-
Docker Scan works with third party providers to detect vulnerabilities,
23+
You need to be logged into the Docker Hub in order to use the `docker scan` command.
24+
Docker Scan works with third party providers to detect vulnerabilities,
2525
the plugin will ask for your consent before sending any data to the provider.
2626
```console
2727
$ docker scan hello-world
2828
? Docker Scan relies upon access to Snyk a third party provider, do you consent to proceed using Snyk? (y/N)
29-
```
29+
```
3030

3131
### Scanning
3232

33-
Docker Scan allows you to scan existing Docker images by name or ID.
33+
Docker Scan allows you to scan existing Docker images by name or ID.
3434

35-
* You can then use `docker scan DOCKER_IMAGE`:
35+
* You can then use `docker scan DOCKER_IMAGE`:
3636
```console
3737
$ docker scan hello-world
38-
38+
3939
Testing hello-world...
40-
40+
4141
Organization: docker-desktop-test
4242
Package manager: linux
4343
Project name: docker-image|hello-world
4444
Docker image: hello-world
4545
Licenses: enabled
46-
46+
4747
✓ Tested 0 dependencies for known issues, no vulnerable paths found.
48-
48+
4949
Note that we do not currently have vulnerability data for your image.
5050
```
5151

@@ -270,13 +270,13 @@ Docker image: 99138c65ebc7
270270
Licenses: enabled
271271

272272
Tested 200 dependencies for known issues, found 157 issues.
273-
```
273+
```
274274
If you want to only display some level of vulnerabilities, the `--severity` flag allows you to choose between 3 levels of
275275
vulnerabilities `low`,`medium` or `high`. By using this tag you will only report vulnerabilities of the provided level
276276
or higher.
277-
277+
278278
```console
279-
$ docker scan --severity=medium docker-scan:e2e
279+
$ docker scan --severity=medium docker-scan:e2e
280280
./bin/docker-scan_darwin_amd64 scan --severity=medium docker-scan:e2e
281281

282282
Testing docker-scan:e2e...
@@ -309,29 +309,31 @@ Platform: linux/amd64
309309
Licenses: enabled
310310

311311
Tested 200 dependencies for known issues, found 37 issues.
312-
```
312+
```
313313

314314
### Provider Authentication
315315

316-
If you have an existing Snyk account, you can directly use your auth token
316+
If you have an existing Snyk account, you can directly use your auth token
317317
```console
318318
$ docker scan --login --token PROVIDER_AUTH_TOKEN
319-
```
319+
```
320320

321321
You need to get a Snyk [API token](https://app.snyk.io/account) and then use it like this
322322
```console
323323
$ docker scan --login --token c68dc480-27bd-45ee-9f5c-XXXXXXXXXXXX
324324

325-
Your account has been authenticated. Snyk is now ready to be used.
325+
Your account has been authenticated. Snyk is now ready to be used.
326326
```
327327

328328
If you use the `--login` command without any token, you will be redirected to the Snyk website to login.
329329

330330
## Install Docker Scan
331331

332332
### On macOS & Windows:
333+
333334
Docker Desktop comes with Docker scan already installed.
334335
Just try to use the plugin, open a terminal and write the following command:
336+
335337
```console
336338
$ docker scan
337339
Usage: docker scan [OPTIONS] IMAGE
@@ -354,19 +356,34 @@ If you get the following error message, you're not using the latest version of D
354356
`docker: 'scan' is not a docker command.`
355357

356358
### On Linux
359+
360+
Docker packaging on Linux comes with Docker scan plugin.
361+
You can simply install Docker following the [standard linux install](https://docs.docker.com/engine/install/#server)
362+
363+
Just try to use the plugin, open a terminal and type the following command:
364+
365+
```console
366+
$ docker scan
367+
Usage: docker scan [OPTIONS] IMAGE
368+
```
369+
370+
If you get the following error message, you're not using the latest version of Docker on Linux
371+
`docker: 'scan' is not a docker command.`
372+
373+
Alternatively, you can manually install the scan docker plugin on top of your existing docker setup :
357374
Download the binary from the latest release and copy it in the `cli-plugins` directory
358375
```sh
359376
mkdir -p ~/.docker/cli-plugins && \
360377
curl https://github.com/docker/scan-cli-plugin/releases/download/latest/docker-scan_linux_amd64 -L -s -S -o ~/.docker/cli-plugins/docker-scan &&\
361378
chmod +x ~/.docker/cli-plugins/docker-scan
362-
```
379+
```
363380

364381
## How to build docker scan
365382

366383
You'll find all the commands to build, run and test Docker Scan inside the [`BUILDING.md`](./BUILDING.md) file.
367384

368385
## Contributing
369386

370-
Want to contribute to Docker Scan? Awesome!
371-
First be sure to read the [Code of conduct](./CODE_OF_CONDUCT.md).
387+
Want to contribute to Docker Scan? Awesome!
388+
First be sure to read the [Code of conduct](./CODE_OF_CONDUCT.md).
372389
You can find information about contributing to this project in the [`CONTRIBUTING.md`](./CONTRIBUTING.md)

0 commit comments

Comments
 (0)