docker scan: using an HTTP proxy (#15044)

* docker scan: using an HTTP proxy

Explain how to use an HTTP proxy in `docker scan`. It's confusing
because it doesn't use the same settings as the engine, the CLI
or Docker Desktop.

Signed-off-by: David Scott <dave.scott@docker.com>

* Update engine/scan/index.md

Clarify proxy:port as proxyAddress:port

Co-authored-by: Paweł Gronowski <me@woland.xyz>

* Update engine/scan/index.md

Capitalize PowerShell

Co-authored-by: Paweł Gronowski <me@woland.xyz>

Co-authored-by: Paweł Gronowski <me@woland.xyz>
This commit is contained in:
David Scott 2022-07-18 06:48:45 -07:00 committed by GitHub
parent 9ac1ab8cc8
commit db2bd107eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -116,6 +116,24 @@ Licenses: enabled
Note that we do not currently have vulnerability data for your image.
```
## Using an HTTP proxy
If your computer needs to use an HTTP proxy, then set the `HTTPS_PROXY` environment variable when using scan. For example:
```console
$ export HTTPS_PROXY=http://username:password@proxyAddress:port
$ docker scan hello-world
```
or for PowerShell:
```console
> $env:HTTPS_PROXY = "http://username:password@proxy:port"
> docker scan hello-world
```
Note that `docker scan` does not use the same proxy settings as Docker Desktop or the settings specified in `.docker/config.json` or the settings used by the Docker engine.
### Get a detailed scan report
You can get a detailed scan report about a Docker image by providing the Dockerfile used to create the image. The syntax is `docker scan --file PATH_TO_DOCKERFILE DOCKER_IMAGE`.