mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
feat(image): custom docker host option (#3599)
Co-authored-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
// $ trivy image alpine:3.15
|
||||
func imageStandaloneScanner(ctx context.Context, conf ScannerConfig) (scanner.Scanner, func(), error) {
|
||||
s, cleanup, err := initializeDockerScanner(ctx, conf.Target, conf.ArtifactCache, conf.LocalArtifactCache,
|
||||
conf.ArtifactOption.RemoteOptions, conf.ArtifactOption)
|
||||
conf.ArtifactOption.ImageOption, conf.ArtifactOption)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, func() {}, xerrors.Errorf("unable to initialize a docker scanner: %w", err)
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func archiveStandaloneScanner(ctx context.Context, conf ScannerConfig) (scanner.
|
||||
func imageRemoteScanner(ctx context.Context, conf ScannerConfig) (
|
||||
scanner.Scanner, func(), error) {
|
||||
s, cleanup, err := initializeRemoteDockerScanner(ctx, conf.Target, conf.ArtifactCache, conf.ServerOption,
|
||||
conf.ArtifactOption.RemoteOptions, conf.ArtifactOption)
|
||||
conf.ArtifactOption.ImageOption, conf.ArtifactOption)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, nil, xerrors.Errorf("unable to initialize the remote docker scanner: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user