scan

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DockerHubRegistry is the docker hub registry
	DockerHubRegistry = "registry.hub.docker.com"
)

Variables

This section is empty.

Functions

func Clone

func Clone(remoteURL string, root string) (string, error)

Clone clones a repository into a newly created directory, returning the resulting directory name.

func NewImageReference

func NewImageReference(path string) (*image.Reference, error)

NewImageReference parses a path of a image and creates a ImageReference object

func NormalizeImageTag

func NormalizeImageTag(img string) string

NormalizeImageTag adds "latest" to the image if the specified image has no tag and it's not referenced by digest.

Types

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner scans Dockerfiles.

func NewScanner

func NewScanner(pm *procmanager.ProcManager, context string, dockerfile string, destination string, buildArgs []string, tags []string, debug bool) (*Scanner, error)

NewScanner creates a new Scanner.

func (*Scanner) GetGitCommitID

func (s *Scanner) GetGitCommitID(ctx context.Context, cmdDir string) (string, error)

GetGitCommitID queries git for the latest commit.

func (*Scanner) NewImageDependencies

func (s *Scanner) NewImageDependencies(img string, runtime string, buildtimes []string) (*image.Dependencies, error)

NewImageDependencies creates Dependencies with no references registered

func (*Scanner) ObtainSourceCode

func (s *Scanner) ObtainSourceCode(ctx context.Context, context string) (workingDir string, sha string, err error)

ObtainSourceCode obtains the source code from the specified context.

func (*Scanner) Scan

func (s *Scanner) Scan(ctx context.Context) (deps []*image.Dependencies, err error)

Scan scans a Dockerfile for dependencies.

func (*Scanner) ScanForDependencies

func (s *Scanner) ScanForDependencies(workingDir string, dockerfile string, buildArgs []string, pushTo []string) (deps []*image.Dependencies, err error)

ScanForDependencies scans for base image dependencies.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL